diff --git a/blog/2015/06/01/README.md b/blog/2015/06/01/README.md index 8c9d5dabf..ef3966f04 100644 --- a/blog/2015/06/01/README.md +++ b/blog/2015/06/01/README.md @@ -41,187 +41,25 @@ however, that was insufficient. If the VGA is the only installed video card, th on inactive CRTC ports. So I've changed the CRTC I/O handlers to check the Card's fActive flag. This seems like a safe and logical change, but I still have to check for backward-compatibility issues with older ROMs. -The VGA ROM programs the card for the first time here: +Other problems included: - EAX=00000000 EBX=00001642 ECX=00000004 EDX=00004AE8 - ESP=000000EA EBP=FFFF00F0 ESI=00006000 EDI=000003D4 - SS=0030 DS=0000 ES=C000 FS=0000 GS=0304 PS=00000246 V0 D0 I1 T0 S0 Z1 A0 P1 C0 - C000:00CB E85910 CALL 1127 ;cycles=5 - videoVGA.outPort(0x03C4,SEQ.INDX,0x00) @C000:112F - videoVGA.outPort(0x03C5,SEQ.RESET,0x01) @C000:112F - videoVGA.outPort(0x03C4,SEQ.INDX,0x01) @C000:1204 - videoVGA.outPort(0x03C5,SEQ.CLK,0x29) @C000:1204 - videoVGA.outPort(0x03C4,SEQ.INDX,0x02) @C000:1204 - videoVGA.outPort(0x03C5,SEQ.MAPMASK,0x0F) @C000:1204 - videoVGA.outPort(0x03C4,SEQ.INDX,0x03) @C000:1204 - videoVGA.outPort(0x03C5,SEQ.CHARMAP,0x00) @C000:1204 - videoVGA.outPort(0x03C4,SEQ.INDX,0x04) @C000:1204 - videoVGA.outPort(0x03C5,SEQ.MODE,0x06) @C000:1204 - videoVGA.outPort(0x03C2,MISC,0x63) @C000:1143 - videoVGA.outPort(0x03C4,SEQ.INDX,0x00) @C000:1149 - videoVGA.outPort(0x03C5,SEQ.RESET,0x03) @C000:1149 - videoVGA.outPort(0x03D4,CRTC.INDX,0x11) @C000:1151 - videoVGA.outPort(0x03D5,CRTC.VERT_RETRACE_END,0x00) @C000:1151 - videoVGA.outPort(0x03D4,CRTC.INDX,0x00) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.HORZ_TOTAL,0x5F) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x01) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.HORZ_DISP_END,0x4F) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x02) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.HORZ_BLANK_START,0x50) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x03) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.HORZ_BLANK_END,0x82) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x04) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.HORZ_RETRACE_START,0x55) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x05) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.HORZ_RETRACE_END,0x81) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x06) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.VERT_TOTAL,0xBF) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x07) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.CRTC_OVERFLOW,0x1F) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x08) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.PRESET_ROW_SCAN,0x00) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x09) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.MAX_SCAN_LINE,0x40) @C000:1204 - removeCursor(): removed from 0,0 - videoVGA.outPort(0x03D4,CRTC.INDX,0x0A) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.CURSOR_START,0x00) @C000:1204 - checkCursor(): cursor moved from -1 to 0 - videoVGA.outPort(0x03D4,CRTC.INDX,0x0B) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.CURSOR_END,0x00) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x0C) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.START_ADDR_HI,0x00) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x0D) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.START_ADDR_LO,0x00) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x0E) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.CURSOR_ADDR_HI,0x00) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x0F) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.CURSOR_ADDR_LO,0x00) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x10) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.VERT_RETRACE_START,0x9C) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x11) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.VERT_RETRACE_END,0x8E) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x12) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.VERT_DISP_END,0x8F) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x13) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.OFFSET,0x28) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x14) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.UNDERLINE,0x1F) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x15) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.VERT_BLANK_START,0x96) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x16) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.VERT_BLANK_END,0xB9) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x17) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.MODE_CTRL,0xE3) @C000:1204 - videoVGA.outPort(0x03D4,CRTC.INDX,0x18) @C000:1204 - videoVGA.outPort(0x03D5,CRTC.LINE_COMPARE,0xFF) @C000:1204 - videoVGA.inPort(0x03DA,STATUS1): 0x00 @C000:1167 - videoVGA.outPort(0x03C0,ATC.INDX,0x10) @C000:116C - videoVGA.outPort(0x03C0,ATC.MODE,0x01) @C000:1171 - videoVGA.outPort(0x03C0,ATC.INDX,0x12) @C000:1174 - videoVGA.outPort(0x03C0,ATC.PLANES,0x0F) @C000:1179 - videoVGA.outPort(0x03C0,ATC.INDX,0x13) @C000:117C - videoVGA.outPort(0x03C0,ATC.HORZPAN,0x00) @C000:1181 - videoVGA.outPort(0x03CE,GRC.INDX,0x00) @C000:1204 - videoVGA.outPort(0x03CF,GRC.SRESET,0x00) @C000:1204 - videoVGA.outPort(0x03CE,GRC.INDX,0x01) @C000:1204 - videoVGA.outPort(0x03CF,GRC.ESRESET,0x00) @C000:1204 - videoVGA.outPort(0x03CE,GRC.INDX,0x02) @C000:1204 - videoVGA.outPort(0x03CF,GRC.COLRCMP,0x0F) @C000:1204 - videoVGA.outPort(0x03CE,GRC.INDX,0x03) @C000:1204 - videoVGA.outPort(0x03CF,GRC.DATAROT,0x00) @C000:1204 - videoVGA.outPort(0x03CE,GRC.INDX,0x04) @C000:1204 - videoVGA.outPort(0x03CF,GRC.READMAP,0x00) @C000:1204 - videoVGA.outPort(0x03CE,GRC.INDX,0x05) @C000:1204 - videoVGA.outPort(0x03CF,GRC.MODE,0x08) @C000:1204 - setAccess(0x0210) - videoVGA.outPort(0x03CE,GRC.INDX,0x06) @C000:1204 - videoVGA.outPort(0x03CF,GRC.MISC,0x05) @C000:1204 - setMode(0x0010) - setMode(16): removing 0x00008000 bytes from 0x000B8000 - setMode(16): adding 0x00010000 bytes to 0x000A0000 - videoVGA.outPort(0x03CE,GRC.INDX,0x07) @C000:1204 - videoVGA.outPort(0x03CF,GRC.COLRDC,0x0F) @C000:1204 - videoVGA.outPort(0x03CE,GRC.INDX,0x08) @C000:1204 - videoVGA.outPort(0x03CF,GRC.BITMASK,0xFF) @C000:1204 - - EAX=0000FF09 EBX=00001642 ECX=00000000 EDX=000003DA - ESP=000000EA EBP=FFFF00F0 ESI=00006000 EDI=000003D4 - SS=0030 DS=0000 ES=C000 FS=0000 GS=0304 PS=00000246 V0 D0 I1 T0 S0 Z1 A0 P1 C0 - C000:00CE 32C0 XOR AL,AL ;cycles=1031 + * Some bugs in Read Mode 1 that caused a memory test failure + * Horizontal and vertical retrace timing issues (the ROM requires a specific number of intervals per second) + * Differences between the EGA and VGA in the SWSENSE bit (bit 4) of Input Status Register 0 -Now that the card was programmed for the first time, I used the `d video` Debugger command to dump the video -card's state: +The last problem was the most puzzling, because the ROM programs a series of values into the first DAC register, +and expects the SWSENSE bit of Input Status Register 0 to change in very specific ways, depending on the kind +of monitor attached. - BIOSMODE: 0x10 - CRTC[0x00]: HORZ_TOTAL 0x5F - CRTC[0x01]: HORZ_DISP_END 0x4F - CRTC[0x02]: HORZ_BLANK_START 0x50 - CRTC[0x03]: HORZ_BLANK_END 0x82 - CRTC[0x04]: HORZ_RETRACE_START 0x55 - CRTC[0x05]: HORZ_RETRACE_END 0x81 - CRTC[0x06]: VERT_TOTAL 0xBF - CRTC[0x07]: CRTC_OVERFLOW 0x1F - CRTC[0x08]: PRESET_ROW_SCAN 0x00 - CRTC[0x09]: MAX_SCAN_LINE 0x40 - CRTC[0x0A]: CURSOR_START 0x00 - CRTC[0x0B]: CURSOR_END 0x00 - CRTC[0x0C]: START_ADDR_HI 0x00 - CRTC[0x0D]: START_ADDR_LO 0x00 - CRTC[0x0E]: CURSOR_ADDR_HI 0x00 - CRTC[0x0F]: CURSOR_ADDR_LO 0x00 - CRTC[0x10]: VERT_RETRACE_START 0x9C - CRTC[0x11]: VERT_RETRACE_END 0x8E - CRTC[0x12]: VERT_DISP_END 0x8F - CRTC[0x13]: OFFSET 0x28 - CRTC[0x14]: UNDERLINE 0x1F - CRTC[0x15]: VERT_BLANK_START 0x96 - CRTC[0x16]: VERT_BLANK_END 0xB9 - CRTC[0x17]: MODE_CTRL 0xE3 - CRTC[0x18]: LINE_COMPARE 0xFF* - STATUS1: 0x00 - ATCDATA: false - ATC[0x00]: PAL00 0x?? - ATC[0x01]: PAL01 0x?? - ATC[0x02]: PAL02 0x?? - ATC[0x03]: PAL03 0x?? - ATC[0x04]: PAL04 0x?? - ATC[0x05]: PAL05 0x?? - ATC[0x06]: PAL06 0x?? - ATC[0x07]: PAL07 0x?? - ATC[0x08]: PAL08 0x?? - ATC[0x09]: PAL09 0x?? - ATC[0x0A]: PAL0A 0x?? - ATC[0x0B]: PAL0B 0x?? - ATC[0x0C]: PAL0C 0x?? - ATC[0x0D]: PAL0D 0x?? - ATC[0x0E]: PAL0E 0x?? - ATC[0x0F]: PAL0F 0x?? - ATC[0x10]: MODE 0x01 - ATC[0x11]: OVRSCAN 0x?? - ATC[0x12]: PLANES 0x0F - ATC[0x13]: HORZPAN 0x00* - GRC[0x00]: SRESET 0x00 - GRC[0x01]: ESRESET 0x00 - GRC[0x02]: COLRCMP 0x0F - GRC[0x03]: DATAROT 0x00 - GRC[0x04]: READMAP 0x00 - GRC[0x05]: MODE 0x08 - GRC[0x06]: MISC 0x05 - GRC[0x07]: COLRDC 0x0F - GRC[0x08]: BITMASK 0xFF* - SEQ[0x00]: RESET 0x03* - SEQ[0x01]: CLK 0x29 - SEQ[0x02]: MAPMASK 0x0F - SEQ[0x03]: CHARMAP 0x00 - SEQ[0x04]: MODE 0x06 - FEAT: 0x00 - MISC: 0x63 - STATUS0: 0x00 - LATCHES: 0x00 - ACCESS: 0x0210 - Use 'dump video buffer' to dump video memory +I've not found any hardware documentation that explains exactly how this should work. IBM's own Technical Reference +material is extremely vague: + + "Bit 4: Switch Sense Bit - This bit allows the system microprocessor to read the switch sense line. + This bit allows the power-on self-test to determine if a monochrome or color display is connected to + the system." + +I've hard-coded a solution that assumes a color monitor. Support for using a monochrome monitor with an EGA was +never completed, and this is another related issue that will have to be resolved for the VGA as well. -If you've noticed that none of the ATC palette registers were programmed, well, that's apparently by design. - *[@jeffpar](http://twitter.com/jeffpar)* *June 1, 2015* diff --git a/devices/pc/video/ibm/vga/ibm-vga.nasm b/devices/pc/video/ibm/vga/ibm-vga.nasm index 682d38879..b755c5a02 100644 --- a/devices/pc/video/ibm/vga/ibm-vga.nasm +++ b/devices/pc/video/ibm/vga/ibm-vga.nasm @@ -196,23 +196,33 @@ x1e5: mov dx,[0x463] ; 000001E5 8B166304 '..c.' out 0x43,al ; 000001F1 E643 '.C' mov al,0x0 ; 000001F3 B000 '..' out 0x40,al ; 000001F5 E640 '.@' + mov ah,0x2 ; 000001F7 B402 '..' +; +; Verify that VERT_RETRACE (bit 3) is clear occassionally... +; x1f9: xor cx,cx ; 000001F9 33C9 '3.' x1fb: in al,dx ; 000001FB EC '.' test al,0x8 ; 000001FC A808 '..' jz x205 ; 000001FE 7405 't.' loop x1fb ; 00000200 E2F9 '..' - jmp x2aa ; 00000202 E9A500 '...' + jmp x2aa ; 00000202 Error: VERT_RETRACE remained set +; +; Verify that VERT_RETRACE (bit 3) is also set occassionally... +; x205: cli ; 00000205 FA '.' x206: in al,dx ; 00000206 EC '.' test al,0x8 ; 00000207 A808 '..' jnz x210 ; 00000209 7505 'u.' loop x206 ; 0000020B E2F9 '..' jmp x2aa ; 0000020D E99A00 '...' - +; +; And perform the two previous verifications a couple of times, just to be sure... +; x210: dec ah ; 00000210 FECC '..' jnz x1f9 ; 00000212 75E5 'u.' + mov al,0x0 ; 00000214 B000 '..' out 0x40,al ; 00000216 E640 '.@' xor cx,cx ; 00000218 33C9 '3.' @@ -220,6 +230,7 @@ x21a: in al,dx ; 0000021A EC '.' test al,0x9 ; 0000021B A809 '..' loopne x21a ; 0000021D E0FB '..' jcxz x239 ; 0000021F E318 '..' + x221: mov cx,0xffff ; 00000221 B9FFFF '...' x224: in al,dx ; 00000224 EC '.' test al,0x1 ; 00000225 A801 '..' @@ -296,7 +307,7 @@ x2a7: out 0x40,al ; 000002A7 E640 '.@' x2aa: sti ; 000002AA FB '.' mov dx,0x103 ; 000002AB BA0301 '...' - call x590 ; 000002AE E8DF02 '...' + call beeps ; 000002AE E8DF02 '...' mov bp,0x2 ; 000002B1 BD0200 '...' jmp short x29d ; 000002B4 EBE7 '..' @@ -331,7 +342,7 @@ x2d6: mov ax,0xa000 ; 000002D6 B800A0 '...' call x2f0 ; 000002E1 E80C00 '...' jz x2ef ; 000002E4 7409 't.' mov dx,0x103 ; 000002E6 BA0301 '...' - call x590 ; 000002E9 E8A402 '...' + call beeps ; 000002E9 E8A402 '...' mov bp,0x2 ; 000002EC BD0200 '...' x2ef: ret ; 000002EF C3 '.' @@ -399,43 +410,56 @@ x364: mov ah,0x1a ; 00000364 B41A '..' call x3fa ; 00000373 E88400 '...' jz x381 ; 00000376 7409 't.' x378: mov dx,0x103 ; 00000378 BA0301 '...' - call x590 ; 0000037B E81202 '...' + call beeps ; 0000037B E81202 '...' mov bp,0x2 ; 0000037E BD0200 '...' x381: mov dx,0x3c6 ; 00000381 BAC603 '...' mov al,0x0 ; 00000384 B000 '..' out dx,al ; 00000386 EE '.' mov ah,0x0 ; 00000387 B400 '..' call x3e6 ; 00000389 E85A00 '.Z.' + mov ah,0x0 ; 0000038C B400 '..' call x127a ; 0000038E E8E90E '...' - mov si,0x454 ; 00000391 BE5404 '.T.' + + mov si,x454 ; 00000391 BE5404 '.T.' mov cx,0x1 ; 00000394 B90100 '...' call x40c ; 00000397 E87200 '.r.' jz x3bc ; 0000039A 7420 't ' - mov si,0x450 ; 0000039C BE5004 '.P.' + + mov si,x450 ; 0000039C BE5004 '.P.' mov cx,0x1 ; 0000039F B90100 '...' call x40c ; 000003A2 E86700 '.g.' jz x3cc ; 000003A5 7425 't%' +; +; Set the "video subsystem inactive" (bit 3) in 0x40:0x87, and the +; "grayscale" (bit 1) and "monochrome monitor" (bit 2) in 0x40:0x89. +; or byte [0x487],0x8 ; 000003A7 800E870408 '.....' or byte [0x489],0x6 ; 000003AC 800E890406 '.....' mov si,0x458 ; 000003B1 BE5804 '.X.' mov cx,0x5 ; 000003B4 B90500 '...' call x40c ; 000003B7 E85200 '.R.' jmp short x3da ; 000003BA EB1E '..' - +; +; Clear the "monochrome monitor" (bit 2) in 0x40:0x89. +; x3bc: and byte [0x489],0xfb ; 000003BC 80268904FB '.&...' - mov si,0x428 ; 000003C1 BE2804 '.(.' + + mov si,x428 ; 000003C1 BE2804 '.(.' mov cx,0x5 ; 000003C4 B90500 '...' call x40c ; 000003C7 E84200 '.B.' jmp short x3da ; 000003CA EB0E '..' - +; +; Set the "grayscale" (bit 1) and "monochrome monitor" (bit 2) in 0x40:0x89. +; x3cc: or byte [0x489],0x6 ; 000003CC 800E890406 '.....' - mov si,0x43c ; 000003D1 BE3C04 '.<.' + mov si,x43c ; 000003D1 BE3C04 '.<.' mov cx,0x5 ; 000003D4 B90500 '...' call x40c ; 000003D7 E83200 '.2.' x3da: jz x3e5 ; 000003DA 7409 't.' + mov dx,0x103 ; 000003DC BA0301 '...' - call x590 ; 000003DF E8AE01 '...' + call beeps ; 000003DF E8AE01 '...' add bp,byte +0x1 ; 000003E2 83C501 '...' x3e5: ret ; 000003E5 C3 '.' @@ -465,7 +489,7 @@ x40c: mov al,[cs:si] ; 0000040C 2E8A04 '...' mov ah,[cs:si+0x1] ; 0000040F 2E8A6401 '..d.' mov bl,[cs:si+0x2] ; 00000413 2E8A5C02 '..\.' push cx ; 00000417 51 'Q' - db 0xE8,0x51,0x00 + call x46c ; 00000418 E85100 pop cx ; 0000041B 59 'Y' add si,byte +0x4 ; 0000041C 83C604 '...' cmp al,[cs:si-0x1] ; 0000041F 2E3A44FF '.:D.' @@ -473,40 +497,31 @@ x40c: mov al,[cs:si] ; 0000040C 2E8A04 '...' loop x40c ; 00000425 E2E5 '..' x427: ret ; 00000427 C3 '.' - adc al,0x14 ; 00000428 1414 '..' - adc al,0x10 ; 0000042A 1410 '..' - sub ax,0x1414 ; 0000042C 2D1414 '-..' - add [si],dl ; 0000042F 0014 '..' - sub ax,0x14 ; 00000431 2D1400 '-..' - adc al,0x14 ; 00000434 1414 '..' - sub ax,0x2d00 ; 00000436 2D002D '-.-' - sub ax,0x2d ; 00000439 2D2D00 '--.' - add al,0x12 ; 0000043C 0412 '..' - add al,0x10 ; 0000043E 0410 '..' - push ds ; 00000440 1E '.' - adc al,[si] ; 00000441 1204 '..' - add [si],al ; 00000443 0004 '..' - sub ax,0x4 ; 00000445 2D0400 '-..' - add al,0x16 ; 00000448 0416 '..' - adc ax,0x0 ; 0000044A 150000 '...' - add [bx+si],al ; 0000044D 0000 '..' - adc [si],al ; 0000044F 1004 '..' - adc al,[si] ; 00000451 1204 '..' - adc [bp+si],dl ; 00000453 1012 '..' - adc dl,[bp+si] ; 00000455 1212 '..' - adc [si],al ; 00000457 1004 '..' - add al,0x4 ; 00000459 0404 '..' - adc [bx+si],dl ; 0000045B 1010 '..' - add al,0x4 ; 0000045D 0404 '..' - add [si],al ; 0000045F 0004 '..' - adc [si],al ; 00000461 1004 '..' - add [si],al ; 00000463 0004 '..' - add al,0x10 ; 00000465 0410 '..' - add [bx+si],dl ; 00000467 0010 '..' - adc [bx+si],dl ; 00000469 1010 '..' - add [bx+si-0x75],dl ; 0000046B 00508B '.P.' - push ss ; 0000046E 16 '.' - arpl [si],ax ; 0000046F 6304 'c.' +x428: db 0x14,0x14,0x14,0x10 + db 0x2D,0x14,0x14,0x00 + db 0x14,0x2D,0x14,0x00 + db 0x14,0x14,0x2D,0x00 + db 0x2D,0x2D,0x2D,0x00 + +x43c: db 0x04,0x12,0x04,0x10 + db 0x1E,0x12,0x04,0x00 + db 0x04,0x2D,0x04,0x00 + db 0x04,0x16,0x15,0x00 + db 0x00,0x00,0x00,0x10 + +x450: db 0x04,0x12,0x04,0x10 + +x454: db 0x12,0x12,0x12,0x10 + + db 0x04,0x04,0x04,0x10 + db 0x10,0x04,0x04,0x00 + db 0x04,0x10,0x04,0x00 + db 0x04,0x04,0x10,0x00 + db 0x10,0x10,0x10,0x00 + +x46c: push ax ; 0000046C 50 + + mov dx,[0x0463] ; 0000046D 8B166304 add dl,0x6 ; 00000471 80C206 '...' mov bh,dl ; 00000474 8AFA '..' xor cx,cx ; 00000476 33C9 '3.' @@ -518,46 +533,47 @@ x479: in al,dx ; 00000479 EC '.' x480: in al,dx ; 00000480 EC '.' test al,0x8 ; 00000481 A808 '..' loope x480 ; 00000483 E1FB '..' + mov al,0x0 ; 00000485 B000 '..' mov dx,0x3c8 ; 00000487 BAC803 '...' out dx,al ; 0000048A EE '.' + pop ax ; 0000048B 58 'X' + mov dx,0x3c9 ; 0000048C BAC903 '...' out dx,al ; 0000048F EE '.' - jmp short x492 ; 00000490 EB00 '..' - -x492: mov al,ah ; 00000492 8AC4 '..' + jmp $+2 ; 00000490 EB00 '..' + mov al,ah ; 00000492 8AC4 '..' out dx,al ; 00000494 EE '.' - jmp short x497 ; 00000495 EB00 '..' - -x497: mov al,bl ; 00000497 8AC3 '..' + jmp $+2 ; 00000495 EB00 '..' + mov al,bl ; 00000497 8AC3 '..' out dx,al ; 00000499 EE '.' + mov dl,bh ; 0000049A 8AD7 '..' xor cx,cx ; 0000049C 33C9 '3.' x49e: in al,dx ; 0000049E EC '.' test al,0x1 ; 0000049F A801 '..' loopne x49e ; 000004A1 E0FB '..' - mov dl,0xc2 ; 000004A3 B2C2 '..' - jmp short x4a7 ; 000004A5 EB00 '..' -x4a7: in al,dx ; 000004A7 EC '.' + mov dl,0xc2 ; 000004A3 B2C2 '..' + jmp $+2 ; 000004A5 EB00 '..' + in al,dx ; 000004A7 EC '.' and al,0x10 ; 000004A8 2410 '$.' + push ax ; 000004AA 50 'P' mov al,0x0 ; 000004AB B000 '..' mov dx,0x3c8 ; 000004AD BAC803 '...' out dx,al ; 000004B0 EE '.' - jmp short x4b3 ; 000004B1 EB00 '..' - -x4b3: mov dx,0x3c9 ; 000004B3 BAC903 '...' + jmp $+2 ; 000004B1 EB00 '..' + mov dx,0x3c9 ; 000004B3 BAC903 '...' out dx,al ; 000004B6 EE '.' - jmp short x4b9 ; 000004B7 EB00 '..' - -x4b9: out dx,al ; 000004B9 EE '.' - jmp short x4bc ; 000004BA EB00 '..' - -x4bc: out dx,al ; 000004BC EE '.' + jmp $+2 ; 000004B7 EB00 '..' + out dx,al ; 000004B9 EE '.' + jmp $+2 ; 000004BA EB00 '..' + out dx,al ; 000004BC EE '.' sti ; 000004BD FB '.' pop ax ; 000004BE 58 'X' + ret ; 000004BF C3 '.' x4c0: mov di,0xb800 ; 000004C0 BF00B8 '...' @@ -576,7 +592,7 @@ x4d9: mov es,di ; 000004D9 8EC7 '..' call x2f0 ; 000004E4 E809FE '...' jz x4f2 ; 000004E7 7409 mov dx,0x102 ; 000004E9 BA0201 '...' - call x590 ; 000004EC E8A100 '...' + call beeps ; 000004EC E8A100 '...' mov bp,0x2 ; 000004EF BD0200 '...' x4f2: mov ax,0x7020 ; 000004F2 B82070 '. p' xor di,di ; 000004F5 33FF '3.' @@ -600,7 +616,7 @@ x515: in al,dx ; 00000515 EC '.' jz x525 ; 00000518 740B 't.' loop x515 ; 0000051A E2F9 '..' x51c: mov dx,0x102 ; 0000051C BA0201 '...' - call x590 ; 0000051F E86E00 '.n.' + call beeps ; 0000051F E86E00 '.n.' mov bp,0x2 ; 00000522 BD0200 '...' x525: mov cl,0x3 ; 00000525 B103 '..' shr ah,cl ; 00000527 D2EC '..' @@ -661,7 +677,11 @@ x586: xchg bl,dl ; 00000586 86DA '..' or al,ah ; 0000058D 0AC4 0x0A,'.' ret ; 0000058F C3 '.' -x590: pushf ; 00000590 9C '.' +; +; (DH) = number of (long?) beeps +; (DL) = number of (short?) beeps +; +beeps: pushf ; 00000590 9C '.' cli ; 00000591 FA '.' or bp,bp ; 00000592 0BED '..' jz x598 ; 00000594 7402 't.' @@ -670,7 +690,7 @@ x598: or dh,dh ; 00000598 0AF6 0x0A,'.' jz x5b0 ; 0000059A 7414 't.' x59c: mov bl,0x5 ; 0000059C B305 '..' mov cx,0x533 ; 0000059E B93305 '.3.' - call x686 ; 000005A1 E8E200 '...' + call beep ; 000005A1 E8E200 '...' xor cx,cx ; 000005A4 33C9 '3.' x5a6: loop x5a6 ; 000005A6 E2FE '..' dec dh ; 000005A8 FECE '..' @@ -681,7 +701,7 @@ x5b0: or dl,dl ; 000005B0 0AD2 0x0A,'.' jz x5c4 ; 000005B2 7410 't.' x5b4: mov bl,0x1 ; 000005B4 B301 '..' mov cx,0x533 ; 000005B6 B93305 '.3.' - call x686 ; 000005B9 E8CA00 '...' + call beep ; 000005B9 E8CA00 '...' xor cx,cx ; 000005BC 33C9 '3.' x5be: loop x5be ; 000005BE E2FE '..' dec dl ; 000005C0 FECA '..' @@ -776,7 +796,7 @@ x677: xor dx,dx ; 00000677 33D2 '3.' int 0x17 ; 00000683 CD17 '..' ret ; 00000685 C3 '.' -x686: mov al,0xb6 ; 00000686 B0B6 '..' +beep: mov al,0xb6 ; 00000686 B0B6 '..' out 0x43,al ; 00000688 E643 '.C' mov al,cl ; 0000068A 8AC1 '..' out 0x42,al ; 0000068C E642 '.B' @@ -2350,893 +2370,135 @@ x127a: mov dx,0x3c4 ; 0000127A BAC403 '...' xchg al,ah ; 0000128D 86C4 '..' ret ; 0000128F C3 '.' - add [bx+si],ax ; 00001290 0100 '..' - add [bx+si],ax ; 00001292 0100 '..' - add [bx+si],ax ; 00001294 0100 '..' - add [bx+si],ax ; 00001296 0100 '..' - add al,[bx+si] ; 00001298 0200 '..' - add al,[bx+si] ; 0000129A 0200 '..' - add al,[bx+si] ; 0000129C 0200 '..' - add [bx+si],ax ; 0000129E 0100 '..' - add ax,[bx+si] ; 000012A0 0300 '..' + db 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x01,0x00 + db 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x03,0x00,0x03,0x00 + db 0x03,0x00,0x03,0x00,0x03,0x00,0x04,0x00,0xC0,0x12,0xE8,0x12,0x0A,0x13,0x1C,0x13 + db 0x42,0x13,0x82,0x13,0xC2,0x13,0x02,0x14,0x42,0x14,0x82,0x14,0xC2,0x14,0x00,0x00 + db 0x00,0x00,0x82,0x15,0xC2,0x15,0x02,0x16,0x42,0x16,0x82,0x16,0xC2,0x16,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x1A,0x02,0x18,0x42,0x18,0x82,0x18,0xC2,0x18 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x17,0xC2,0x17,0x02,0x19,0x02,0x19,0x42,0x19 + db 0x42,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x19,0x42,0x15,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC2,0x19 + db 0x02,0x1A,0x28,0x18,0x08,0x00,0x08,0x09,0x03,0x00,0x02,0x63,0x2D,0x27,0x28,0x90 + db 0x2B,0xA0,0xBF,0x1F,0x00,0xC7,0x06,0x07,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x14 + db 0x1F,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x28,0x18,0x08,0x00,0x08,0x09,0x03,0x00,0x02,0x63,0x2D,0x27,0x28,0x90 + db 0x2B,0xA0,0xBF,0x1F,0x00,0xC7,0x06,0x07,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x14 + db 0x1F,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x18,0x08,0x00,0x10,0x01,0x03,0x00,0x02,0x63,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0xC7,0x06,0x07,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x1F,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x18,0x08,0x00,0x10,0x01,0x03,0x00,0x02,0x63,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0xC7,0x06,0x07,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x1F,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x28,0x18,0x08,0x00,0x40,0x09,0x03,0x00,0x02,0x63,0x2D,0x27,0x28,0x90 + db 0x2B,0x80,0xBF,0x1F,0x00,0xC1,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x14 + db 0x00,0x96,0xB9,0xA2,0xFF,0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x0F + db 0x00,0xFF,0x28,0x18,0x08,0x00,0x40,0x09,0x03,0x00,0x02,0x63,0x2D,0x27,0x28,0x90 + db 0x2B,0x80,0xBF,0x1F,0x00,0xC1,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x14 + db 0x00,0x96,0xB9,0xA2,0xFF,0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x0F + db 0x00,0xFF,0x50,0x18,0x08,0x00,0x40,0x01,0x01,0x00,0x06,0x63,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0xBF,0x1F,0x00,0xC1,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x00,0x96,0xB9,0xC2,0xFF,0x00,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17 + db 0x17,0x17,0x17,0x17,0x17,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D + db 0x00,0xFF,0x50,0x18,0x0E,0x00,0x10,0x00,0x03,0x00,0x03,0xA6,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x4D,0x0B,0x0C,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x28 + db 0x0D,0x63,0xBA,0xA3,0xFF,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x10,0x18,0x18 + db 0x18,0x18,0x18,0x18,0x18,0x0E,0x00,0x0F,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x0A + db 0x00,0xFF,0x50,0x18,0x10,0x00,0x7D,0x21,0x0F,0x00,0x06,0x63,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x1F,0x96,0xB9,0xE3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x01,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x0F,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x28,0x18,0x08,0x00,0x40,0x00,0x00,0x00,0x03,0x23,0x37,0x27,0x2D,0x37 + db 0x31,0x15,0x04,0x11,0x00,0x47,0x06,0x07,0x00,0x00,0x00,0x00,0xE1,0x24,0xC7,0x14 + db 0x08,0xE0,0xF0,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x00,0x00,0x00,0x00,0x29,0x0F,0x00,0x06,0x62,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x1F,0x96,0xB9,0xE3,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x3F,0x01,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x08,0x05 + db 0x0F,0xFF,0x50,0x00,0x00,0x00,0x00,0x29,0x0F,0x00,0x06,0x63,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x1F,0x96,0xB9,0xE3,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x00,0x00,0x00,0x00,0x3F,0x01,0x00,0x0F,0x00,0x00,0x00,0x0F,0x00,0x00,0x08,0x05 + db 0x0F,0xFF,0x28,0x18,0x08,0x00,0x20,0x09,0x0F,0x00,0x06,0x63,0x2D,0x27,0x28,0x90 + db 0x2B,0x80,0xBF,0x1F,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x14 + db 0x00,0x96,0xB9,0xE3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x01,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x0F,0xFF,0x50,0x18,0x08,0x00,0x40,0x01,0x0F,0x00,0x06,0x63,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0xBF,0x1F,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x00,0x96,0xB9,0xE3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x10,0x11,0x12 + db 0x13,0x14,0x15,0x16,0x17,0x01,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x0F,0xFF,0x50,0x18,0x0E,0x00,0x80,0x05,0x0F,0x00,0x00,0xA2,0x60,0x4F,0x56,0x1A + db 0x50,0xE0,0x70,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x2E,0x5D,0x14 + db 0x00,0x5E,0x6E,0x8B,0xFF,0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x08,0x00 + db 0x00,0x00,0x18,0x00,0x00,0x0B,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x07 + db 0x0F,0xFF,0x50,0x18,0x0E,0x00,0x80,0x05,0x0F,0x00,0x00,0xA7,0x5B,0x4F,0x53,0x17 + db 0x50,0xBA,0x6C,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5E,0x2B,0x5D,0x14 + db 0x0F,0x5F,0x0A,0x8B,0xFF,0x00,0x01,0x00,0x00,0x04,0x07,0x00,0x00,0x00,0x01,0x00 + db 0x00,0x04,0x07,0x00,0x00,0x01,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x07 + db 0x0F,0xFF,0x50,0x18,0x0E,0x00,0x80,0x01,0x0F,0x00,0x06,0xA2,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0xBF,0x1F,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x28 + db 0x0F,0x63,0xBA,0xE3,0xFF,0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x08,0x00 + db 0x00,0x00,0x18,0x00,0x00,0x0B,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x05,0xFF,0x50,0x18,0x0E,0x00,0x80,0x01,0x0F,0x00,0x06,0xA3,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0xBF,0x1F,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x28 + db 0x0F,0x63,0xBA,0xE3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x01,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x0F,0xFF,0x28,0x18,0x0E,0x00,0x08,0x09,0x03,0x00,0x02,0xA3,0x2D,0x27,0x28,0x90 + db 0x2B,0xA0,0xBF,0x1F,0x00,0x4D,0x0B,0x0C,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x14 + db 0x1F,0x63,0xBA,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x28,0x18,0x0E,0x00,0x08,0x09,0x03,0x00,0x02,0xA3,0x2D,0x27,0x28,0x90 + db 0x2B,0xA0,0xBF,0x1F,0x00,0x4D,0x0B,0x0C,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x14 + db 0x1F,0x63,0xBA,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x18,0x0E,0x00,0x10,0x01,0x03,0x00,0x02,0xA3,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x4D,0x0B,0x0C,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x28 + db 0x1F,0x63,0xBA,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x18,0x0E,0x00,0x10,0x01,0x03,0x00,0x02,0xA3,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x4D,0x0B,0x0C,0x00,0x00,0x00,0x00,0x83,0x85,0x5D,0x28 + db 0x1F,0x63,0xBA,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x08,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x28,0x18,0x10,0x00,0x08,0x08,0x03,0x00,0x02,0x67,0x2D,0x27,0x28,0x90 + db 0x2B,0xA0,0xBF,0x1F,0x00,0x4F,0x0D,0x0E,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x14 + db 0x1F,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x0C,0x00,0x0F,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x18,0x10,0x00,0x10,0x00,0x03,0x00,0x02,0x67,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x4F,0x0D,0x0E,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x1F,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x0C,0x00,0x0F,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x0E + db 0x00,0xFF,0x50,0x18,0x10,0x00,0x10,0x00,0x03,0x00,0x02,0x66,0x5F,0x4F,0x50,0x82 + db 0x55,0x81,0xBF,0x1F,0x00,0x4F,0x0D,0x0E,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x0F,0x96,0xB9,0xA3,0xFF,0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x10,0x18,0x18 + db 0x18,0x18,0x18,0x18,0x18,0x0E,0x00,0x0F,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x0A + db 0x00,0xFF,0x50,0x1D,0x10,0x00,0xA0,0x01,0x0F,0x00,0x06,0xE3,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0x0B,0x3E,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xEA,0x8C,0xDF,0x28 + db 0x00,0xE7,0x04,0xC3,0xFF,0x00,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F + db 0x3F,0x3F,0x3F,0x3F,0x3F,0x01,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x01,0xFF,0x50,0x1D,0x10,0x00,0xA0,0x01,0x0F,0x00,0x06,0xE3,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0x0B,0x3E,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xEA,0x8C,0xDF,0x28 + db 0x00,0xE7,0x04,0xE3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A + db 0x3B,0x3C,0x3D,0x3E,0x3F,0x01,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05 + db 0x0F,0xFF,0x28,0x18,0x08,0x00,0x20,0x01,0x0F,0x00,0x0E,0x63,0x5F,0x4F,0x50,0x82 + db 0x54,0x80,0xBF,0x1F,0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0x8E,0x8F,0x28 + db 0x40,0x96,0xB9,0xA3,0xFF,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A + db 0x0B,0x0C,0x0D,0x0E,0x0F,0x41,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x05 + db 0x0F,0xFF - times 4 dw 0x0000 ; 000012A2 - 000012A8 - add ax,[bx+si] ; 000012AA 0300 '..' - add ax,[bx+si] ; 000012AC 0300 '..' - add ax,[bx+si] ; 000012AE 0300 '..' - add ax,[bx+si] ; 000012B0 0300 '..' - add ax,[bx+si] ; 000012B2 0300 '..' - add ax,[bx+si] ; 000012B4 0300 '..' - add al,0x0 ; 000012B6 0400 '..' - rcl byte [bp+si],0xe8 ; 000012B8 C012E8 '...' - adc cl,[bp+si] ; 000012BB 120A '.',0x0A - adc bx,[si] ; 000012BD 131C '..' - adc ax,[bp+si+0x13] ; 000012BF 134213 '.B.' - db 0x82 ; 000012C2 82 '.' - adc ax,dx ; 000012C3 13C2 '..' - adc ax,[bp+si] ; 000012C5 1302 '..' - adc al,0x42 ; 000012C7 1442 '.B' - adc al,0x82 ; 000012C9 1482 '..' - adc al,0xc2 ; 000012CB 14C2 '..' - adc al,0x0 ; 000012CD 1400 '..' - add [bx+si],al ; 000012CF 0000 '..' - add [bp+si+0xc215],al ; 000012D1 008215C2 '....' - adc ax,0x1602 ; 000012D5 150216 '...' - inc dx ; 000012D8 42 'B' - push ss ; 000012D9 16 '.' - db 0x82 ; 000012DA 82 '.' - push ss ; 000012DB 16 '.' - ret 0x16 ; 000012DC C21600 '...' - - add [bx+si],al ; 000012DF 0000 '..' - add [bx+si],al ; 000012E1 0000 '..' - add [bx+si],al ; 000012E3 0000 '..' - add [bp+si+0x1a],al ; 000012E5 00421A '.B.' - add bl,[bx+si] ; 000012E8 0218 '..' - inc dx ; 000012EA 42 'B' - sbb [bp+si+0xc218],al ; 000012EB 188218C2 '....' - sbb [bx+si],al ; 000012EF 1800 '..' - add [bx+si],al ; 000012F1 0000 '..' - add [bx+si],al ; 000012F3 0000 '..' - add [bp+si],al ; 000012F5 0002 '..' - adc ax,0x0 ; 000012F7 150000 '...' - - times 6 dw 0x0000 ; 000012FA - 00001304 - db 0x82 ; 00001306 82 '.' - pop ss ; 00001307 17 '.' - ret 0x217 ; 00001308 C21702 '...' - - sbb [bp+si],ax ; 0000130B 1902 '..' - sbb [bp+si+0x19],ax ; 0000130D 194219 '.B.' - inc dx ; 00001310 42 'B' - sbb [bx+si],ax ; 00001311 1900 '..' - add [bx+si],al ; 00001313 0000 '..' - add [bx+si],al ; 00001315 0000 '..' - add [bp+si+0x4219],al ; 00001317 00821942 '...B' - adc ax,0x0 ; 0000131B 150000 '...' - - times 16 dw 0x0000 ; 0000131E - 0000133C - ret 0x219 ; 0000133E C21902 '...' - - sbb ch,[bx+si] ; 00001341 1A28 '.(' - sbb [bx+si],cl ; 00001343 1808 '..' - add [bx+si],cl ; 00001345 0008 '..' - or [bp+di],ax ; 00001347 0903 '..' - add [bp+si],al ; 00001349 0002 '..' - arpl [di],bp ; 0000134B 632D 'c-' - daa ; 0000134D 27 0x27 - sub [bx+si+0xa02b],dl ; 0000134E 28902BA0 '(.+.' - mov di,0x1f ; 00001352 BF1F00 '...' - mov word [0x7],0x0 ; 00001355 C70607000000 '......' - add [si+0x8f8e],bl ; 0000135B 009C8E8F '....' - adc al,0x1f ; 0000135F 141F '..' - xchg ax,si ; 00001361 96 '.' - mov cx,0xffa3 ; 00001362 B9A3FF '...' - add [bx+di],al ; 00001365 0001 '..' - add al,[bp+di] ; 00001367 0203 '..' - add al,0x5 ; 00001369 0405 '..' - push es ; 0000136B 06 '.' - pop es ; 0000136C 07 '.' - adc [bx+di],dl ; 0000136D 1011 '..' - adc dl,[bp+di] ; 0000136F 1213 '..' - adc al,0x15 ; 00001371 1415 '..' - push ss ; 00001373 16 '.' - pop ss ; 00001374 17 '.' - or [bx+si],al ; 00001375 0800 '..' - sldt [bx+si] ; 00001377 0F0000 '...' - add [bx+si],al ; 0000137A 0000 '..' - add [bx+si],al ; 0000137C 0000 '..' - adc [0xff00],cl ; 0000137E 100E00FF '....' - sub [bx+si],bl ; 00001382 2818 '(.' - or [bx+si],al ; 00001384 0800 '..' - or [bx+di],cl ; 00001386 0809 '..' - add ax,[bx+si] ; 00001388 0300 '..' - add ah,[bp+di+0x2d] ; 0000138A 02632D '.c-' - daa ; 0000138D 27 0x27 - sub [bx+si+0xa02b],dl ; 0000138E 28902BA0 '(.+.' - mov di,0x1f ; 00001392 BF1F00 '...' - mov word [0x7],0x0 ; 00001395 C70607000000 '......' - add [si+0x8f8e],bl ; 0000139B 009C8E8F '....' - adc al,0x1f ; 0000139F 141F '..' - xchg ax,si ; 000013A1 96 '.' - mov cx,0xffa3 ; 000013A2 B9A3FF '...' - add [bx+di],al ; 000013A5 0001 '..' - add al,[bp+di] ; 000013A7 0203 '..' - add al,0x5 ; 000013A9 0405 '..' - push es ; 000013AB 06 '.' - pop es ; 000013AC 07 '.' - adc [bx+di],dl ; 000013AD 1011 '..' - adc dl,[bp+di] ; 000013AF 1213 '..' - adc al,0x15 ; 000013B1 1415 '..' - push ss ; 000013B3 16 '.' - pop ss ; 000013B4 17 '.' - or [bx+si],al ; 000013B5 0800 '..' - sldt [bx+si] ; 000013B7 0F0000 '...' - add [bx+si],al ; 000013BA 0000 '..' - add [bx+si],al ; 000013BC 0000 '..' - adc [0xff00],cl ; 000013BE 100E00FF '....' - push ax ; 000013C2 50 'P' - sbb [bx+si],cl ; 000013C3 1808 '..' - add [bx+si],dl ; 000013C5 0010 '..' - add [bp+di],ax ; 000013C7 0103 '..' - add [bp+si],al ; 000013C9 0002 '..' - arpl [bx+0x4f],bx ; 000013CB 635F4F 'c_O' - push ax ; 000013CE 50 'P' - db 0x82 ; 000013CF 82 '.' - push bp ; 000013D0 55 'U' - cmp word [bx+0x1f],0x6c7 ; 000013D1 81BF1F00C706 '......' - pop es ; 000013D7 07 '.' - add [bx+si],al ; 000013D8 0000 '..' - add [bx+si],al ; 000013DA 0000 '..' - pushf ; 000013DC 9C '.' - mov cs,[bx+0x1f28] ; 000013DD 8E8F281F '..(.' - xchg ax,si ; 000013E1 96 '.' - mov cx,0xffa3 ; 000013E2 B9A3FF '...' - add [bx+di],al ; 000013E5 0001 '..' - add al,[bp+di] ; 000013E7 0203 '..' - add al,0x5 ; 000013E9 0405 '..' - push es ; 000013EB 06 '.' - pop es ; 000013EC 07 '.' - adc [bx+di],dl ; 000013ED 1011 '..' - adc dl,[bp+di] ; 000013EF 1213 '..' - adc al,0x15 ; 000013F1 1415 '..' - push ss ; 000013F3 16 '.' - pop ss ; 000013F4 17 '.' - or [bx+si],al ; 000013F5 0800 '..' - sldt [bx+si] ; 000013F7 0F0000 '...' - add [bx+si],al ; 000013FA 0000 '..' - add [bx+si],al ; 000013FC 0000 '..' - adc [0xff00],cl ; 000013FE 100E00FF '....' - push ax ; 00001402 50 'P' - sbb [bx+si],cl ; 00001403 1808 '..' - add [bx+si],dl ; 00001405 0010 '..' - add [bp+di],ax ; 00001407 0103 '..' - add [bp+si],al ; 00001409 0002 '..' - arpl [bx+0x4f],bx ; 0000140B 635F4F 'c_O' - push ax ; 0000140E 50 'P' - db 0x82 ; 0000140F 82 '.' - push bp ; 00001410 55 'U' - cmp word [bx+0x1f],0x6c7 ; 00001411 81BF1F00C706 '......' - pop es ; 00001417 07 '.' - add [bx+si],al ; 00001418 0000 '..' - add [bx+si],al ; 0000141A 0000 '..' - pushf ; 0000141C 9C '.' - mov cs,[bx+0x1f28] ; 0000141D 8E8F281F '..(.' - xchg ax,si ; 00001421 96 '.' - mov cx,0xffa3 ; 00001422 B9A3FF '...' - add [bx+di],al ; 00001425 0001 '..' - add al,[bp+di] ; 00001427 0203 '..' - add al,0x5 ; 00001429 0405 '..' - push es ; 0000142B 06 '.' - pop es ; 0000142C 07 '.' - adc [bx+di],dl ; 0000142D 1011 '..' - adc dl,[bp+di] ; 0000142F 1213 '..' - adc al,0x15 ; 00001431 1415 '..' - push ss ; 00001433 16 '.' - pop ss ; 00001434 17 '.' - or [bx+si],al ; 00001435 0800 '..' - sldt [bx+si] ; 00001437 0F0000 '...' - add [bx+si],al ; 0000143A 0000 '..' - add [bx+si],al ; 0000143C 0000 '..' - adc [0xff00],cl ; 0000143E 100E00FF '....' - sub [bx+si],bl ; 00001442 2818 '(.' - or [bx+si],al ; 00001444 0800 '..' - inc ax ; 00001446 40 '@' - or [bp+di],ax ; 00001447 0903 '..' - add [bp+si],al ; 00001449 0002 '..' - arpl [di],bp ; 0000144B 632D 'c-' - daa ; 0000144D 27 0x27 - sub [bx+si+0x802b],dl ; 0000144E 28902B80 '(.+.' - mov di,0x1f ; 00001452 BF1F00 '...' - rol word [bx+si],0x0 ; 00001455 C10000 '...' - add [bx+si],al ; 00001458 0000 '..' - add [bx+si],al ; 0000145A 0000 '..' - pushf ; 0000145C 9C '.' - mov cs,[bx+0x14] ; 0000145D 8E8F1400 '....' - xchg ax,si ; 00001461 96 '.' - mov cx,0xffa2 ; 00001462 B9A2FF '...' - add [bp+di],dl ; 00001465 0013 '..' - adc ax,0x217 ; 00001467 151702 '...' - add al,0x6 ; 0000146A 0406 '..' - pop es ; 0000146C 07 '.' - adc [bx+di],dl ; 0000146D 1011 '..' - adc dl,[bp+di] ; 0000146F 1213 '..' - adc al,0x15 ; 00001471 1415 '..' - push ss ; 00001473 16 '.' - pop ss ; 00001474 17 '.' - add [bx+si],ax ; 00001475 0100 '..' - add ax,[bx+si] ; 00001477 0300 '..' - add [bx+si],al ; 00001479 0000 '..' - add [bx+si],al ; 0000147B 0000 '..' - add [bx+si],dh ; 0000147D 0030 '.0' - db 0x0F ; 0000147F 0F '.' - add bh,bh ; 00001480 00FF '..' - sub [bx+si],bl ; 00001482 2818 '(.' - or [bx+si],al ; 00001484 0800 '..' - inc ax ; 00001486 40 '@' - or [bp+di],ax ; 00001487 0903 '..' - add [bp+si],al ; 00001489 0002 '..' - arpl [di],bp ; 0000148B 632D 'c-' - daa ; 0000148D 27 0x27 - sub [bx+si+0x802b],dl ; 0000148E 28902B80 '(.+.' - mov di,0x1f ; 00001492 BF1F00 '...' - rol word [bx+si],0x0 ; 00001495 C10000 '...' - add [bx+si],al ; 00001498 0000 '..' - add [bx+si],al ; 0000149A 0000 '..' - pushf ; 0000149C 9C '.' - mov cs,[bx+0x14] ; 0000149D 8E8F1400 '....' - xchg ax,si ; 000014A1 96 '.' - mov cx,0xffa2 ; 000014A2 B9A2FF '...' - add [bp+di],dl ; 000014A5 0013 '..' - adc ax,0x217 ; 000014A7 151702 '...' - add al,0x6 ; 000014AA 0406 '..' - pop es ; 000014AC 07 '.' - adc [bx+di],dl ; 000014AD 1011 '..' - adc dl,[bp+di] ; 000014AF 1213 '..' - adc al,0x15 ; 000014B1 1415 '..' - push ss ; 000014B3 16 '.' - pop ss ; 000014B4 17 '.' - add [bx+si],ax ; 000014B5 0100 '..' - add ax,[bx+si] ; 000014B7 0300 '..' - add [bx+si],al ; 000014B9 0000 '..' - add [bx+si],al ; 000014BB 0000 '..' - add [bx+si],dh ; 000014BD 0030 '.0' - db 0x0F ; 000014BF 0F '.' - add bh,bh ; 000014C0 00FF '..' - push ax ; 000014C2 50 'P' - sbb [bx+si],cl ; 000014C3 1808 '..' - add [bx+si+0x1],al ; 000014C5 004001 '.@.' - add [bx+si],ax ; 000014C8 0100 '..' - push es ; 000014CA 06 '.' - arpl [bx+0x4f],bx ; 000014CB 635F4F 'c_O' - push ax ; 000014CE 50 'P' - db 0x82 ; 000014CF 82 '.' - push sp ; 000014D0 54 'T' - cmp byte [bx+0x1f],0xc1 ; 000014D1 80BF1F00C1 '.....' - add [bx+si],al ; 000014D6 0000 '..' - add [bx+si],al ; 000014D8 0000 '..' - add [bx+si],al ; 000014DA 0000 '..' - pushf ; 000014DC 9C '.' - mov cs,[bx+0x28] ; 000014DD 8E8F2800 '..(.' - xchg ax,si ; 000014E1 96 '.' - mov cx,0xffc2 ; 000014E2 B9C2FF '...' - add [bx],dl ; 000014E5 0017 '..' - pop ss ; 000014E7 17 '.' - pop ss ; 000014E8 17 '.' - pop ss ; 000014E9 17 '.' - pop ss ; 000014EA 17 '.' - pop ss ; 000014EB 17 '.' - pop ss ; 000014EC 17 '.' - pop ss ; 000014ED 17 '.' - pop ss ; 000014EE 17 '.' - pop ss ; 000014EF 17 '.' - pop ss ; 000014F0 17 '.' - pop ss ; 000014F1 17 '.' - pop ss ; 000014F2 17 '.' - pop ss ; 000014F3 17 '.' - pop ss ; 000014F4 17 '.' - add [bx+si],ax ; 000014F5 0100 '..' - add [bx+si],ax ; 000014F7 0100 '..' - add [bx+si],al ; 000014F9 0000 '..' - add [bx+si],al ; 000014FB 0000 '..' - add [bx+si],al ; 000014FD 0000 '..' - or ax,0xff00 ; 000014FF 0D00FF 0x0D,'..' - push ax ; 00001502 50 'P' - sbb [0x1000],cl ; 00001503 180E0010 '....' - add [bp+di],al ; 00001507 0003 '..' - add [bp+di],al ; 00001509 0003 '..' - cmpsb ; 0000150B A6 '.' - pop di ; 0000150C 5F '_' - dec di ; 0000150D 4F 'O' - push ax ; 0000150E 50 'P' - db 0x82 ; 0000150F 82 '.' - push bp ; 00001510 55 'U' - cmp word [bx+0x1f],0xb4d ; 00001511 81BF1F004D0B '....M.' - or al,0x0 ; 00001517 0C00 '..' - add [bx+si],al ; 00001519 0000 '..' - add [bp+di+0x5d85],al ; 0000151B 0083855D '...]' - sub [di],cl ; 0000151F 280D '(',0x0D - arpl [bp+si+0xffa3],di ; 00001521 63BAA3FF 'c...' - add [bx+si],cl ; 00001525 0008 '..' - or [bx+si],cl ; 00001527 0808 '..' - or [bx+si],cl ; 00001529 0808 '..' - or [bx+si],cl ; 0000152B 0808 '..' - adc [bx+si],bl ; 0000152D 1018 '..' - sbb [bx+si],bl ; 0000152F 1818 '..' - sbb [bx+si],bl ; 00001531 1818 '..' - sbb [bx+si],bl ; 00001533 1818 '..' - push cs ; 00001535 0E '.' - add [bx],cl ; 00001536 000F '..' - or [bx+si],al ; 00001538 0800 '..' - add [bx+si],al ; 0000153A 0000 '..' - add [bx+si],al ; 0000153C 0000 '..' - adc [bp+si],cl ; 0000153E 100A '.',0x0A - add bh,bh ; 00001540 00FF '..' - push ax ; 00001542 50 'P' - sbb [bx+si],dl ; 00001543 1810 '..' - add [di+0x21],bh ; 00001545 007D21 '.}!' - sldt [0x5f63] ; 00001548 0F0006635F '...c_' - dec di ; 0000154D 4F 'O' - push ax ; 0000154E 50 'P' - db 0x82 ; 0000154F 82 '.' - push bp ; 00001550 55 'U' - cmp word [bx+0x1f],0x40 ; 00001551 81BF1F004000 '....@.' - add [bx+si],al ; 00001557 0000 '..' - add [bx+si],al ; 00001559 0000 '..' - add [si+0x8f8e],bl ; 0000155B 009C8E8F '....' - sub [bx],bl ; 0000155F 281F '(.' - xchg ax,si ; 00001561 96 '.' - mov cx,0xffe3 ; 00001562 B9E3FF '...' - add [bx+di],al ; 00001565 0001 '..' - add al,[bp+di] ; 00001567 0203 '..' - add al,0x5 ; 00001569 0405 '..' - adc al,0x7 ; 0000156B 1407 '..' - db '89:;<=>?' - add [bx+si],ax ; 00001575 0100 '..' - sldt [bx+si] ; 00001577 0F0000 '...' - add [bx+si],al ; 0000157A 0000 '..' - add [bx+si],al ; 0000157C 0000 '..' - add [di],al ; 0000157E 0005 '..' - ud0 ; 00001580 0FFF '..' - - times 32 dw 0x0000 ; 00001582 - 000015C0 - sub [bx+si],bl ; 000015C2 2818 '(.' - or [bx+si],al ; 000015C4 0800 '..' - inc ax ; 000015C6 40 '@' - add [bx+si],al ; 000015C7 0000 '..' - add [bp+di],al ; 000015C9 0003 '..' - and si,[bx] ; 000015CB 2337 '#7' - daa ; 000015CD 27 0x27 - sub ax,0x3137 ; 000015CE 2D3731 '-71' - adc ax,0x1104 ; 000015D1 150411 '...' - add [bx+0x6],al ; 000015D4 004706 '.G.' - pop es ; 000015D7 07 '.' - add [bx+si],al ; 000015D8 0000 '..' - add [bx+si],al ; 000015DA 0000 '..' - loope x1602 ; 000015DC E124 '.$' - db 0xC7 ; 000015DE C7 '.' - adc al,0x8 ; 000015DF 1408 '..' - db 0xE0,0xF0 - mov [0xff],ax ; 000015E3 A3FF00 '...' - add [bp+si],ax ; 000015E6 0102 '..' - add ax,[si] ; 000015E8 0304 '..' - add ax,0x706 ; 000015EA 050607 '...' - adc [bx+di],dl ; 000015ED 1011 '..' - adc dl,[bp+di] ; 000015EF 1213 '..' - adc al,0x15 ; 000015F1 1415 '..' - push ss ; 000015F3 16 '.' - pop ss ; 000015F4 17 '.' - or [bx+si],al ; 000015F5 0800 '..' - sldt [bx+si] ; 000015F7 0F0000 '...' - add [bx+si],al ; 000015FA 0000 '..' - add [bx+si],al ; 000015FC 0000 '..' - adc [0xff00],cl ; 000015FE 100E00FF '....' -x1602: push ax ; 00001602 50 'P' - add [bx+si],al ; 00001603 0000 '..' - add [bx+si],al ; 00001605 0000 '..' - sub [bx],cx ; 00001607 290F ').' - add [0x5f62],al ; 00001609 0006625F '..b_' - dec di ; 0000160D 4F 'O' - push ax ; 0000160E 50 'P' - db 0x82 ; 0000160F 82 '.' - push bp ; 00001610 55 'U' - cmp word [bx+0x1f],0x40 ; 00001611 81BF1F004000 '....@.' - add [bx+si],al ; 00001617 0000 '..' - add [bx+si],al ; 00001619 0000 '..' - add [si+0x8f8e],bl ; 0000161B 009C8E8F '....' - sub [bx],bl ; 0000161F 281F '(.' - xchg ax,si ; 00001621 96 '.' - mov cx,0xffe3 ; 00001622 B9E3FF '...' - - times 7 dw 0x0000 ; 00001625 - 00001631 - add [bx],bh ; 00001633 003F '.?' - add [bx+si],ax ; 00001635 0100 '..' - sldt [bx+si] ; 00001637 0F0000 '...' - add [bx],cl ; 0000163A 000F '..' - add [bx+si],al ; 0000163C 0000 '..' - or [di],al ; 0000163E 0805 '..' - ud0 ; 00001640 0FFF '..' - push ax ; 00001642 50 'P' - add [bx+si],al ; 00001643 0000 '..' - add [bx+si],al ; 00001645 0000 '..' - sub [bx],cx ; 00001647 290F ').' - add [0x5f63],al ; 00001649 0006635F '..c_' - dec di ; 0000164D 4F 'O' - push ax ; 0000164E 50 'P' - db 0x82 ; 0000164F 82 '.' - push bp ; 00001650 55 'U' - cmp word [bx+0x1f],0x40 ; 00001651 81BF1F004000 '....@.' - add [bx+si],al ; 00001657 0000 '..' - add [bx+si],al ; 00001659 0000 '..' - add [si+0x8f8e],bl ; 0000165B 009C8E8F '....' - sub [bx],bl ; 0000165F 281F '(.' - xchg ax,si ; 00001661 96 '.' - mov cx,0xffe3 ; 00001662 B9E3FF '...' - - times 7 dw 0x0000 ; 00001665 - 00001671 - add [bx],bh ; 00001673 003F '.?' - add [bx+si],ax ; 00001675 0100 '..' - sldt [bx+si] ; 00001677 0F0000 '...' - add [bx],cl ; 0000167A 000F '..' - add [bx+si],al ; 0000167C 0000 '..' - or [di],al ; 0000167E 0805 '..' - ud0 ; 00001680 0FFF '..' - sub [bx+si],bl ; 00001682 2818 '(.' - or [bx+si],al ; 00001684 0800 '..' - and [bx+di],cl ; 00001686 2009 ' .' - sldt [0x2d63] ; 00001688 0F0006632D '...c-' - daa ; 0000168D 27 0x27 - sub [bx+si+0x802b],dl ; 0000168E 28902B80 '(.+.' - mov di,0x1f ; 00001692 BF1F00 '...' - rol byte [bx+si],0x0 ; 00001695 C00000 '...' - add [bx+si],al ; 00001698 0000 '..' - add [bx+si],al ; 0000169A 0000 '..' - pushf ; 0000169C 9C '.' - mov cs,[bx+0x14] ; 0000169D 8E8F1400 '....' - xchg ax,si ; 000016A1 96 '.' - mov cx,0xffe3 ; 000016A2 B9E3FF '...' - add [bx+di],al ; 000016A5 0001 '..' - add al,[bp+di] ; 000016A7 0203 '..' - add al,0x5 ; 000016A9 0405 '..' - push es ; 000016AB 06 '.' - pop es ; 000016AC 07 '.' - adc [bx+di],dl ; 000016AD 1011 '..' - adc dl,[bp+di] ; 000016AF 1213 '..' - adc al,0x15 ; 000016B1 1415 '..' - push ss ; 000016B3 16 '.' - pop ss ; 000016B4 17 '.' - add [bx+si],ax ; 000016B5 0100 '..' - sldt [bx+si] ; 000016B7 0F0000 '...' - add [bx+si],al ; 000016BA 0000 '..' - add [bx+si],al ; 000016BC 0000 '..' - add [di],al ; 000016BE 0005 '..' - ud0 ; 000016C0 0FFF '..' - push ax ; 000016C2 50 'P' - sbb [bx+si],cl ; 000016C3 1808 '..' - add [bx+si+0x1],al ; 000016C5 004001 '.@.' - sldt [0x5f63] ; 000016C8 0F0006635F '...c_' - dec di ; 000016CD 4F 'O' - push ax ; 000016CE 50 'P' - db 0x82 ; 000016CF 82 '.' - push sp ; 000016D0 54 'T' - cmp byte [bx+0x1f],0xc0 ; 000016D1 80BF1F00C0 '.....' - add [bx+si],al ; 000016D6 0000 '..' - add [bx+si],al ; 000016D8 0000 '..' - add [bx+si],al ; 000016DA 0000 '..' - pushf ; 000016DC 9C '.' - mov cs,[bx+0x28] ; 000016DD 8E8F2800 '..(.' - xchg ax,si ; 000016E1 96 '.' - mov cx,0xffe3 ; 000016E2 B9E3FF '...' - add [bx+di],al ; 000016E5 0001 '..' - add al,[bp+di] ; 000016E7 0203 '..' - add al,0x5 ; 000016E9 0405 '..' - push es ; 000016EB 06 '.' - pop es ; 000016EC 07 '.' - adc [bx+di],dl ; 000016ED 1011 '..' - adc dl,[bp+di] ; 000016EF 1213 '..' - adc al,0x15 ; 000016F1 1415 '..' - push ss ; 000016F3 16 '.' - pop ss ; 000016F4 17 '.' - add [bx+si],ax ; 000016F5 0100 '..' - sldt [bx+si] ; 000016F7 0F0000 '...' - add [bx+si],al ; 000016FA 0000 '..' - add [bx+si],al ; 000016FC 0000 '..' - add [di],al ; 000016FE 0005 '..' - ud0 ; 00001700 0FFF '..' - push ax ; 00001702 50 'P' - sbb [0x8000],cl ; 00001703 180E0080 '....' - add ax,0xf ; 00001707 050F00 '...' - add [bp+si+0x4f60],ah ; 0000170A 00A2604F '..`O' - push si ; 0000170E 56 'V' - sbb dl,[bx+si-0x20] ; 0000170F 1A50E0 '.P.' - jo x1733 ; 00001712 701F 'p.' - - times 4 dw 0x0000 ; 00001714 - 0000171A - pop si ; 0000171C 5E '^' - cs pop bp ; 0000171D 2E5D '.]' - adc al,0x0 ; 0000171F 1400 '..' - pop si ; 00001721 5E '^' - outsb ; 00001722 6E 'n' - mov di,di ; 00001723 8BFF '..' - add [bx+si],cl ; 00001725 0008 '..' - add [bx+si],al ; 00001727 0000 '..' - sbb [bx+si],bl ; 00001729 1818 '..' - add [bx+si],al ; 0000172B 0000 '..' - add [bx+si],cl ; 0000172D 0008 '..' - add [bx+si],al ; 0000172F 0000 '..' - add [bx+si],bl ; 00001731 0018 '..' -x1733: add [bx+si],al ; 00001733 0000 '..' - or ax,[bx+si] ; 00001735 0B00 '..' - add ax,0x0 ; 00001737 050000 '...' - add [bx+si],al ; 0000173A 0000 '..' - add [bx+si],al ; 0000173C 0000 '..' - adc [bx],al ; 0000173E 1007 '..' - ud0 ; 00001740 0FFF '..' - push ax ; 00001742 50 'P' - sbb [0x8000],cl ; 00001743 180E0080 '....' - add ax,0xf ; 00001747 050F00 '...' - add [bx+0x4f5b],ah ; 0000174A 00A75B4F '..[O' - push bx ; 0000174E 53 'S' - pop ss ; 0000174F 17 '.' - push ax ; 00001750 50 'P' - mov dx,0x1f6c ; 00001751 BA6C1F '.l.' - - times 4 dw 0x0000 ; 00001754 - 0000175A - pop si ; 0000175C 5E '^' - sub bx,[di+0x14] ; 0000175D 2B5D14 '+].' - maxps xmm1,[bp+si] ; 00001760 0F5F0A '._',0x0A - mov di,di ; 00001763 8BFF '..' - add [bx+di],al ; 00001765 0001 '..' - add [bx+si],al ; 00001767 0000 '..' - add al,0x7 ; 00001769 0407 '..' - add [bx+si],al ; 0000176B 0000 '..' - add [bx+di],al ; 0000176D 0001 '..' - add [bx+si],al ; 0000176F 0000 '..' - add al,0x7 ; 00001771 0407 '..' - add [bx+si],al ; 00001773 0000 '..' - add [bx+si],ax ; 00001775 0100 '..' - add ax,0x0 ; 00001777 050000 '...' - add [bx+si],al ; 0000177A 0000 '..' - add [bx+si],al ; 0000177C 0000 '..' - adc [bx],al ; 0000177E 1007 '..' - ud0 ; 00001780 0FFF '..' - push ax ; 00001782 50 'P' - sbb [0x8000],cl ; 00001783 180E0080 '....' - add [bx],cx ; 00001787 010F '..' - add [0x5fa2],al ; 00001789 0006A25F '..._' - dec di ; 0000178D 4F 'O' - push ax ; 0000178E 50 'P' - db 0x82 ; 0000178F 82 '.' - push sp ; 00001790 54 'T' - cmp byte [bx+0x1f],0x40 ; 00001791 80BF1F0040 '....@' - add [bx+si],al ; 00001796 0000 '..' - add [bx+si],al ; 00001798 0000 '..' - add [bx+si],al ; 0000179A 0000 '..' - add word [di+0x285d],byte +0xf; 0000179C 83855D280F '..](.' - arpl [bp+si+0xffe3],di ; 000017A1 63BAE3FF 'c...' - add [bx+si],cl ; 000017A5 0008 '..' - add [bx+si],al ; 000017A7 0000 '..' - sbb [bx+si],bl ; 000017A9 1818 '..' - add [bx+si],al ; 000017AB 0000 '..' - add [bx+si],cl ; 000017AD 0008 '..' - add [bx+si],al ; 000017AF 0000 '..' - add [bx+si],bl ; 000017B1 0018 '..' - add [bx+si],al ; 000017B3 0000 '..' - or ax,[bx+si] ; 000017B5 0B00 '..' - add ax,0x0 ; 000017B7 050000 '...' - add [bx+si],al ; 000017BA 0000 '..' - add [bx+si],al ; 000017BC 0000 '..' - add [di],al ; 000017BE 0005 '..' - add ax,0x50ff ; 000017C0 05FF50 '..P' - sbb [0x8000],cl ; 000017C3 180E0080 '....' - add [bx],cx ; 000017C7 010F '..' - add [0x5fa3],al ; 000017C9 0006A35F '..._' - dec di ; 000017CD 4F 'O' - push ax ; 000017CE 50 'P' - db 0x82 ; 000017CF 82 '.' - push sp ; 000017D0 54 'T' - cmp byte [bx+0x1f],0x40 ; 000017D1 80BF1F0040 '....@' - add [bx+si],al ; 000017D6 0000 '..' - add [bx+si],al ; 000017D8 0000 '..' - add [bx+si],al ; 000017DA 0000 '..' - add word [di+0x285d],byte +0xf; 000017DC 83855D280F '..](.' - arpl [bp+si+0xffe3],di ; 000017E1 63BAE3FF 'c...' - add [bx+di],al ; 000017E5 0001 '..' - add al,[bp+di] ; 000017E7 0203 '..' - add al,0x5 ; 000017E9 0405 '..' - adc al,0x7 ; 000017EB 1407 '..' - db '89:;<=>?' - add [bx+si],ax ; 000017F5 0100 '..' - sldt [bx+si] ; 000017F7 0F0000 '...' - add [bx+si],al ; 000017FA 0000 '..' - add [bx+si],al ; 000017FC 0000 '..' - add [di],al ; 000017FE 0005 '..' - ud0 ; 00001800 0FFF '..' - sub [bx+si],bl ; 00001802 2818 '(.' - push cs ; 00001804 0E '.' - add [bx+si],cl ; 00001805 0008 '..' - or [bp+di],ax ; 00001807 0903 '..' - add [bp+si],al ; 00001809 0002 '..' - mov [0x272d],ax ; 0000180B A32D27 '.-',0x27 - sub [bx+si+0xa02b],dl ; 0000180E 28902BA0 '(.+.' - mov di,0x1f ; 00001812 BF1F00 '...' - dec bp ; 00001815 4D 'M' - or cx,[si] ; 00001816 0B0C '..' - add [bx+si],al ; 00001818 0000 '..' - add [bx+si],al ; 0000181A 0000 '..' - add word [di+0x145d],byte +0x1f; 0000181C 83855D141F '..]..' - arpl [bp+si+0xffa3],di ; 00001821 63BAA3FF 'c...' - add [bx+di],al ; 00001825 0001 '..' - add al,[bp+di] ; 00001827 0203 '..' - add al,0x5 ; 00001829 0405 '..' - adc al,0x7 ; 0000182B 1407 '..' - db '89:;<=>?' - or [bx+si],al ; 00001835 0800 '..' - sldt [bx+si] ; 00001837 0F0000 '...' - add [bx+si],al ; 0000183A 0000 '..' - add [bx+si],al ; 0000183C 0000 '..' - adc [0xff00],cl ; 0000183E 100E00FF '....' - sub [bx+si],bl ; 00001842 2818 '(.' - push cs ; 00001844 0E '.' - add [bx+si],cl ; 00001845 0008 '..' - or [bp+di],ax ; 00001847 0903 '..' - add [bp+si],al ; 00001849 0002 '..' - mov [0x272d],ax ; 0000184B A32D27 '.-',0x27 - sub [bx+si+0xa02b],dl ; 0000184E 28902BA0 '(.+.' - mov di,0x1f ; 00001852 BF1F00 '...' - dec bp ; 00001855 4D 'M' - or cx,[si] ; 00001856 0B0C '..' - add [bx+si],al ; 00001858 0000 '..' - add [bx+si],al ; 0000185A 0000 '..' - add word [di+0x145d],byte +0x1f; 0000185C 83855D141F '..]..' - arpl [bp+si+0xffa3],di ; 00001861 63BAA3FF 'c...' - add [bx+di],al ; 00001865 0001 '..' - add al,[bp+di] ; 00001867 0203 '..' - add al,0x5 ; 00001869 0405 '..' - adc al,0x7 ; 0000186B 1407 '..' - db '89:;<=>?' - or [bx+si],al ; 00001875 0800 '..' - sldt [bx+si] ; 00001877 0F0000 '...' - add [bx+si],al ; 0000187A 0000 '..' - add [bx+si],al ; 0000187C 0000 '..' - adc [0xff00],cl ; 0000187E 100E00FF '....' - push ax ; 00001882 50 'P' - sbb [0x1000],cl ; 00001883 180E0010 '....' - add [bp+di],ax ; 00001887 0103 '..' - add [bp+si],al ; 00001889 0002 '..' - mov [0x4f5f],ax ; 0000188B A35F4F '._O' - push ax ; 0000188E 50 'P' - db 0x82 ; 0000188F 82 '.' - push bp ; 00001890 55 'U' - cmp word [bx+0x1f],0xb4d ; 00001891 81BF1F004D0B '....M.' - or al,0x0 ; 00001897 0C00 '..' - add [bx+si],al ; 00001899 0000 '..' - add [bp+di+0x5d85],al ; 0000189B 0083855D '...]' - sub [bx],bl ; 0000189F 281F '(.' - arpl [bp+si+0xffa3],di ; 000018A1 63BAA3FF 'c...' - add [bx+di],al ; 000018A5 0001 '..' - add al,[bp+di] ; 000018A7 0203 '..' - add al,0x5 ; 000018A9 0405 '..' - adc al,0x7 ; 000018AB 1407 '..' - db '89:;<=>?' - or [bx+si],al ; 000018B5 0800 '..' - sldt [bx+si] ; 000018B7 0F0000 '...' - add [bx+si],al ; 000018BA 0000 '..' - add [bx+si],al ; 000018BC 0000 '..' - adc [0xff00],cl ; 000018BE 100E00FF '....' - push ax ; 000018C2 50 'P' - sbb [0x1000],cl ; 000018C3 180E0010 '....' - add [bp+di],ax ; 000018C7 0103 '..' - add [bp+si],al ; 000018C9 0002 '..' - mov [0x4f5f],ax ; 000018CB A35F4F '._O' - push ax ; 000018CE 50 'P' - db 0x82 ; 000018CF 82 '.' - push bp ; 000018D0 55 'U' - cmp word [bx+0x1f],0xb4d ; 000018D1 81BF1F004D0B '....M.' - or al,0x0 ; 000018D7 0C00 '..' - add [bx+si],al ; 000018D9 0000 '..' - add [bp+di+0x5d85],al ; 000018DB 0083855D '...]' - sub [bx],bl ; 000018DF 281F '(.' - arpl [bp+si+0xffa3],di ; 000018E1 63BAA3FF 'c...' - add [bx+di],al ; 000018E5 0001 '..' - add al,[bp+di] ; 000018E7 0203 '..' - add al,0x5 ; 000018E9 0405 '..' - adc al,0x7 ; 000018EB 1407 '..' - db '89:;<=>?' - or [bx+si],al ; 000018F5 0800 '..' - sldt [bx+si] ; 000018F7 0F0000 '...' - add [bx+si],al ; 000018FA 0000 '..' - add [bx+si],al ; 000018FC 0000 '..' - adc [0xff00],cl ; 000018FE 100E00FF '....' - sub [bx+si],bl ; 00001902 2818 '(.' - adc [bx+si],al ; 00001904 1000 '..' - or [bx+si],cl ; 00001906 0808 '..' - add ax,[bx+si] ; 00001908 0300 '..' - add ah,[bx+0x2d] ; 0000190A 02672D '.g-' - daa ; 0000190D 27 0x27 - sub [bx+si+0xa02b],dl ; 0000190E 28902BA0 '(.+.' - mov di,0x1f ; 00001912 BF1F00 '...' - dec di ; 00001915 4F 'O' - or ax,0xe ; 00001916 0D0E00 0x0D,'..' - add [bx+si],al ; 00001919 0000 '..' - add [si+0x8f8e],bl ; 0000191B 009C8E8F '....' - adc al,0x1f ; 0000191F 141F '..' - xchg ax,si ; 00001921 96 '.' - mov cx,0xffa3 ; 00001922 B9A3FF '...' - add [bx+di],al ; 00001925 0001 '..' - add al,[bp+di] ; 00001927 0203 '..' - add al,0x5 ; 00001929 0405 '..' - adc al,0x7 ; 0000192B 1407 '..' - db '89:;<=>?' - or al,0x0 ; 00001935 0C00 '..' - invd ; 00001937 0F08 '..' - add [bx+si],al ; 00001939 0000 '..' - add [bx+si],al ; 0000193B 0000 '..' - add [bx+si],dl ; 0000193D 0010 '..' - push cs ; 0000193F 0E '.' - add bh,bh ; 00001940 00FF '..' - push ax ; 00001942 50 'P' - sbb [bx+si],dl ; 00001943 1810 '..' - add [bx+si],dl ; 00001945 0010 '..' - add [bp+di],al ; 00001947 0003 '..' - add [bp+si],al ; 00001949 0002 '..' - a32 pop di ; 0000194B 675F 'g_' - dec di ; 0000194D 4F 'O' - push ax ; 0000194E 50 'P' - db 0x82 ; 0000194F 82 '.' - push bp ; 00001950 55 'U' - cmp word [bx+0x1f],0xd4f ; 00001951 81BF1F004F0D '....O',0x0D - push cs ; 00001957 0E '.' - add [bx+si],al ; 00001958 0000 '..' - add [bx+si],al ; 0000195A 0000 '..' - pushf ; 0000195C 9C '.' - mov cs,[bx+0x1f28] ; 0000195D 8E8F281F '..(.' - xchg ax,si ; 00001961 96 '.' - mov cx,0xffa3 ; 00001962 B9A3FF '...' - add [bx+di],al ; 00001965 0001 '..' - add al,[bp+di] ; 00001967 0203 '..' - add al,0x5 ; 00001969 0405 '..' - adc al,0x7 ; 0000196B 1407 '..' - db '89:;<=>?' - or al,0x0 ; 00001975 0C00 '..' - invd ; 00001977 0F08 '..' - add [bx+si],al ; 00001979 0000 '..' - add [bx+si],al ; 0000197B 0000 '..' - add [bx+si],dl ; 0000197D 0010 '..' - push cs ; 0000197F 0E '.' - add bh,bh ; 00001980 00FF '..' - push ax ; 00001982 50 'P' - sbb [bx+si],dl ; 00001983 1810 '..' - add [bx+si],dl ; 00001985 0010 '..' - add [bp+di],al ; 00001987 0003 '..' - add [bp+si],al ; 00001989 0002 '..' - pop edi ; 0000198B 665F 'f_' - dec di ; 0000198D 4F 'O' - push ax ; 0000198E 50 'P' - db 0x82 ; 0000198F 82 '.' - push bp ; 00001990 55 'U' - cmp word [bx+0x1f],0xd4f ; 00001991 81BF1F004F0D '....O',0x0D - push cs ; 00001997 0E '.' - add [bx+si],al ; 00001998 0000 '..' - add [bx+si],al ; 0000199A 0000 '..' - pushf ; 0000199C 9C '.' - mov cs,[bx+0xf28] ; 0000199D 8E8F280F '..(.' - xchg ax,si ; 000019A1 96 '.' - mov cx,0xffa3 ; 000019A2 B9A3FF '...' - add [bx+si],cl ; 000019A5 0008 '..' - or [bx+si],cl ; 000019A7 0808 '..' - or [bx+si],cl ; 000019A9 0808 '..' - or [bx+si],cl ; 000019AB 0808 '..' - adc [bx+si],bl ; 000019AD 1018 '..' - sbb [bx+si],bl ; 000019AF 1818 '..' - sbb [bx+si],bl ; 000019B1 1818 '..' - sbb [bx+si],bl ; 000019B3 1818 '..' - push cs ; 000019B5 0E '.' - add [bx],cl ; 000019B6 000F '..' - or [bx+si],al ; 000019B8 0800 '..' - add [bx+si],al ; 000019BA 0000 '..' - add [bx+si],al ; 000019BC 0000 '..' - adc [bp+si],cl ; 000019BE 100A '.',0x0A - add bh,bh ; 000019C0 00FF '..' - push ax ; 000019C2 50 'P' - sbb ax,0x10 ; 000019C3 1D1000 '...' - mov al,[0xf01] ; 000019C6 A0010F '...' - add [0x5fe3],al ; 000019C9 0006E35F '..._' - dec di ; 000019CD 4F 'O' - push ax ; 000019CE 50 'P' - db 0x82 ; 000019CF 82 '.' - push sp ; 000019D0 54 'T' - or byte [bp+di],0x3e ; 000019D1 800B3E '..>' - add [bx+si+0x0],al ; 000019D4 004000 '.@.' - add [bx+si],al ; 000019D7 0000 '..' - add [bx+si],al ; 000019D9 0000 '..' - add dl,ch ; 000019DB 00EA '..' - mov di,ds ; 000019DD 8CDF '..' - sub [bx+si],al ; 000019DF 2800 '(.' - out 0x4,ax ; 000019E1 E704 '..' - ret ; 000019E3 C3 '.' - - inc word [bx+si] ; 000019E4 FF00 '..' - aas ; 000019E6 3F '?' - aas ; 000019E7 3F '?' - aas ; 000019E8 3F '?' - aas ; 000019E9 3F '?' - aas ; 000019EA 3F '?' - aas ; 000019EB 3F '?' - aas ; 000019EC 3F '?' - aas ; 000019ED 3F '?' - aas ; 000019EE 3F '?' - aas ; 000019EF 3F '?' - aas ; 000019F0 3F '?' - aas ; 000019F1 3F '?' - aas ; 000019F2 3F '?' - aas ; 000019F3 3F '?' - aas ; 000019F4 3F '?' - add [bx+si],ax ; 000019F5 0100 '..' - sldt [bx+si] ; 000019F7 0F0000 '...' - add [bx+si],al ; 000019FA 0000 '..' - add [bx+si],al ; 000019FC 0000 '..' - add [di],al ; 000019FE 0005 '..' - add di,di ; 00001A00 01FF '..' - push ax ; 00001A02 50 'P' - sbb ax,0x10 ; 00001A03 1D1000 '...' - mov al,[0xf01] ; 00001A06 A0010F '...' - add [0x5fe3],al ; 00001A09 0006E35F '..._' - dec di ; 00001A0D 4F 'O' - push ax ; 00001A0E 50 'P' - db 0x82 ; 00001A0F 82 '.' - push sp ; 00001A10 54 'T' - or byte [bp+di],0x3e ; 00001A11 800B3E '..>' - add [bx+si+0x0],al ; 00001A14 004000 '.@.' - add [bx+si],al ; 00001A17 0000 '..' - add [bx+si],al ; 00001A19 0000 '..' - add dl,ch ; 00001A1B 00EA '..' - mov di,ds ; 00001A1D 8CDF '..' - sub [bx+si],al ; 00001A1F 2800 '(.' - out 0x4,ax ; 00001A21 E704 '..' - db 0xE3,0xFF - add [bx+di],al ; 00001A25 0001 '..' - add al,[bp+di] ; 00001A27 0203 '..' - add al,0x5 ; 00001A29 0405 '..' - adc al,0x7 ; 00001A2B 1407 '..' - db '89:;<=>?' - add [bx+si],ax ; 00001A35 0100 '..' - sldt [bx+si] ; 00001A37 0F0000 '...' - add [bx+si],al ; 00001A3A 0000 '..' - add [bx+si],al ; 00001A3C 0000 '..' - add [di],al ; 00001A3E 0005 '..' - ud0 ; 00001A40 0FFF '..' - sub [bx+si],bl ; 00001A42 2818 '(.' - or [bx+si],al ; 00001A44 0800 '..' - and [bx+di],al ; 00001A46 2001 ' .' - str [0x5f63] ; 00001A48 0F000E635F '...c_' - dec di ; 00001A4D 4F 'O' - push ax ; 00001A4E 50 'P' - db 0x82 ; 00001A4F 82 '.' - push sp ; 00001A50 54 'T' - cmp byte [bx+0x1f],0x41 ; 00001A51 80BF1F0041 '....A' - add [bx+si],al ; 00001A56 0000 '..' - add [bx+si],al ; 00001A58 0000 '..' - add [bx+si],al ; 00001A5A 0000 '..' - pushf ; 00001A5C 9C '.' - mov cs,[bx+0x4028] ; 00001A5D 8E8F2840 '..(@' - xchg ax,si ; 00001A61 96 '.' - mov cx,0xffa3 ; 00001A62 B9A3FF '...' - add [bx+di],al ; 00001A65 0001 '..' - add al,[bp+di] ; 00001A67 0203 '..' - add al,0x5 ; 00001A69 0405 '..' - push es ; 00001A6B 06 '.' - pop es ; 00001A6C 07 '.' - or [bx+di],cl ; 00001A6D 0809 '..' - or cl,[bp+di] ; 00001A6F 0A0B 0x0A,'.' - or al,0xd ; 00001A71 0C0D '.',0x0D - push cs ; 00001A73 0E '.' - cmovno ax,[bx+si] ; 00001A74 0F4100 '.A.' - sldt [bx+si] ; 00001A77 0F0000 '...' - add [bx+si],al ; 00001A7A 0000 '..' - add [bx+si],al ; 00001A7C 0000 '..' - inc ax ; 00001A7E 40 '@' - add ax,0xff0f ; 00001A7F 050FFF '...' push ax ; 00001A82 50 'P' and al,0x7f ; 00001A83 247F '$.' cmp al,0x13 ; 00001A85 3C13 '<.' @@ -5892,293 +5154,43 @@ x2f9a: push cx ; 00002F9A 51 'Q' jl x2f9a ; 00002FAE 7CEA '|.' ret ; 00002FB0 C3 '.' - add [bx+di],al ; 00002FB1 0001 '..' - add al,[bp+di] ; 00002FB3 0203 '..' - add al,0x5 ; 00002FB5 0405 '..' - push es ; 00002FB7 06 '.' - pop es ; 00002FB8 07 '.' - or [bx+di],cl ; 00002FB9 0809 '..' - or cl,[bp+di] ; 00002FBB 0A0B 0x0A,'.' - or al,0xd ; 00002FBD 0C0D '.',0x0D - push cs ; 00002FBF 0E '.' - umov [bx+di],dl ; 00002FC0 0F1011 '...' - adc dl,[bp+di] ; 00002FC3 1213 '..' - adc al,0x15 ; 00002FC5 1415 '..' - push ss ; 00002FC7 16 '.' - pop ss ; 00002FC8 17 '.' - sbb [bx+di],bl ; 00002FC9 1819 '..' - sbb bl,[bp+di] ; 00002FCB 1A1B '..' - sbb al,0x1d ; 00002FCD 1C1D '..' - push ds ; 00002FCF 1E '.' - pop ds ; 00002FD0 1F '.' - db ' !"#$%&',0x27,'()*+,-./0123456789:;<=>?' - add [di],al ; 00002FF1 0005 '..' - adc [si],bx ; 00002FF3 111C '..' - or [bp+di],cl ; 00002FF5 080B '..' - and ax,0x228 ; 00002FF7 252802 '%(.' - pop es ; 00002FFA 07 '.' - sbb sp,[bx+si] ; 00002FFB 1B20 '. ' - unpcklps xmm5,[bx+si] ; 00002FFD 0F1428 '..(' - sub al,0xc ; 00003000 2C0C ',.' - adc [di],sp ; 00003002 1125 '.%' - sub dl,[si] ; 00003004 2A14 '*.' - push ds ; 00003006 1E '.' - xor dh,[0x130f] ; 00003007 32360F13 '26..' - daa ; 0000300B 27 0x27 - sub al,0x1b ; 0000300C 2C1B ',.' - and [si],dh ; 0000300E 2034 ' 4' - cmp [0x1f0b],ax ; 00003010 39060B1F '9...' - and al,0x13 ; 00003014 2413 '$.' - sbb [si],ch ; 00003016 182C '.,' - xor [bx+di],cl ; 00003018 3009 '0.' - or ax,0x2621 ; 0000301A 0D2126 0x0D,'!&' - adc ax,0x2e1a ; 0000301D 151A2E '...' - xor dx,[bp+di] ; 00003020 3313 '3.' - pop ss ; 00003022 17 '.' - sub si,[bx+si] ; 00003023 2B30 '+0' - pop ds ; 00003025 1F '.' - and al,0x38 ; 00003026 2438 '$8' - cmp ax,0x180e ; 00003028 3D0E18 '=..' - sub ax,0x2032 ; 0000302B 2D3220 '-2 ' - and al,0x38 ; 0000302E 2438 '$8' - aas ; 00003030 3F '?' - add [bx+di],al ; 00003031 0001 '..' - add al,[bp+di] ; 00003033 0203 '..' - add al,0x5 ; 00003035 0405 '..' - adc al,0x7 ; 00003037 1407 '..' - add [bx+di],al ; 00003039 0001 '..' - add al,[bp+di] ; 0000303B 0203 '..' - add al,0x5 ; 0000303D 0405 '..' - adc al,0x7 ; 0000303F 1407 '..' - db '89:;<=>?89:;<=>?' - add [bx+di],al ; 00003051 0001 '..' - add al,[bp+di] ; 00003053 0203 '..' - add al,0x5 ; 00003055 0405 '..' - adc al,0x7 ; 00003057 1407 '..' - add [bx+di],al ; 00003059 0001 '..' - add al,[bp+di] ; 0000305B 0203 '..' - add al,0x5 ; 0000305D 0405 '..' - adc al,0x7 ; 0000305F 1407 '..' - db '89:;<=>?89:;<=>?' - add [di],al ; 00003071 0005 '..' - adc [si],bx ; 00003073 111C '..' - or [bp+di],cl ; 00003075 080B '..' - adc al,0x28 ; 00003077 1428 '.(' - add [di],al ; 00003079 0005 '..' - adc [si],bx ; 0000307B 111C '..' - or [bp+di],cl ; 0000307D 080B '..' - adc al,0x28 ; 0000307F 1428 '.(' - push cs ; 00003081 0E '.' - sbb [di],ch ; 00003082 182D '.-' - xor ah,[bx+si] ; 00003084 3220 '2 ' - and al,0x38 ; 00003086 2438 '$8' - aas ; 00003088 3F '?' - push cs ; 00003089 0E '.' - sbb [di],ch ; 0000308A 182D '.-' - xor ah,[bx+si] ; 0000308C 3220 '2 ' - and al,0x38 ; 0000308E 2438 '$8' - aas ; 00003090 3F '?' - add [di],al ; 00003091 0005 '..' - adc [si],bx ; 00003093 111C '..' - or [bp+di],cl ; 00003095 080B '..' - adc al,0x28 ; 00003097 1428 '.(' - add [di],al ; 00003099 0005 '..' - adc [si],bx ; 0000309B 111C '..' - or [bp+di],cl ; 0000309D 080B '..' - adc al,0x28 ; 0000309F 1428 '.(' - push cs ; 000030A1 0E '.' - sbb [di],ch ; 000030A2 182D '.-' - xor ah,[bx+si] ; 000030A4 3220 '2 ' - and al,0x38 ; 000030A6 2438 '$8' - aas ; 000030A8 3F '?' - push cs ; 000030A9 0E '.' - sbb [di],ch ; 000030AA 182D '.-' - xor ah,[bx+si] ; 000030AC 3220 '2 ' - and al,0x38 ; 000030AE 2438 '$8' - aas ; 000030B0 3F '?' - - times 4 dw 0x0000 ; 000030B1 - 000030B7 - pop es ; 000030B9 07 '.' - pop es ; 000030BA 07 '.' - pop es ; 000030BB 07 '.' - pop es ; 000030BC 07 '.' - pop es ; 000030BD 07 '.' - pop es ; 000030BE 07 '.' - pop es ; 000030BF 07 '.' - pop es ; 000030C0 07 '.' - pop es ; 000030C1 07 '.' - pop es ; 000030C2 07 '.' - pop es ; 000030C3 07 '.' - pop es ; 000030C4 07 '.' - pop es ; 000030C5 07 '.' - pop es ; 000030C6 07 '.' - pop es ; 000030C7 07 '.' - pop es ; 000030C8 07 '.' - aas ; 000030C9 3F '?' - aas ; 000030CA 3F '?' - aas ; 000030CB 3F '?' - aas ; 000030CC 3F '?' - aas ; 000030CD 3F '?' - aas ; 000030CE 3F '?' - aas ; 000030CF 3F '?' - aas ; 000030D0 3F '?' - - times 4 dw 0x0000 ; 000030D1 - 000030D7 - pop es ; 000030D9 07 '.' - pop es ; 000030DA 07 '.' - pop es ; 000030DB 07 '.' - pop es ; 000030DC 07 '.' - pop es ; 000030DD 07 '.' - pop es ; 000030DE 07 '.' - pop es ; 000030DF 07 '.' - pop es ; 000030E0 07 '.' - pop es ; 000030E1 07 '.' - pop es ; 000030E2 07 '.' - pop es ; 000030E3 07 '.' - pop es ; 000030E4 07 '.' - pop es ; 000030E5 07 '.' - pop es ; 000030E6 07 '.' - pop es ; 000030E7 07 '.' - pop es ; 000030E8 07 '.' - aas ; 000030E9 3F '?' - aas ; 000030EA 3F '?' - aas ; 000030EB 3F '?' - aas ; 000030EC 3F '?' - aas ; 000030ED 3F '?' - aas ; 000030EE 3F '?' - aas ; 000030EF 3F '?' - aas ; 000030F0 3F '?' - add [bx+di],al ; 000030F1 0001 '..' - add al,[bp+di] ; 000030F3 0203 '..' - add al,0x5 ; 000030F5 0405 '..' - adc al,0x7 ; 000030F7 1407 '..' - db '89:;<=>?' - add [di],al ; 00003101 0005 '..' - adc [si],bx ; 00003103 111C '..' - or [bp+di],cl ; 00003105 080B '..' - adc al,0x28 ; 00003107 1428 '.(' - push cs ; 00003109 0E '.' - sbb [di],ch ; 0000310A 182D '.-' - xor ah,[bx+si] ; 0000310C 3220 '2 ' - and al,0x38 ; 0000310E 2438 '$8' - aas ; 00003110 3F '?' - add [di],al ; 00003111 0005 '..' - or [bp+di],cl ; 00003113 080B '..' - push cs ; 00003115 0E '.' - adc [si],dx ; 00003116 1114 '..' - sbb [si],bl ; 00003118 181C '..' - db ' $(-28?' - add [bx+si],dl ; 00003121 0010 '..' - pop ds ; 00003123 1F '.' - das ; 00003124 2F '/' - aas ; 00003125 3F '?' - aas ; 00003126 3F '?' - aas ; 00003127 3F '?' - aas ; 00003128 3F '?' - aas ; 00003129 3F '?' - aas ; 0000312A 3F '?' - aas ; 0000312B 3F '?' - aas ; 0000312C 3F '?' - aas ; 0000312D 3F '?' - das ; 0000312E 2F '/' - pop ds ; 0000312F 1F '.' - adc [bx+si],al ; 00003130 1000 '..' - add [bx+si],al ; 00003132 0000 '..' - add [bx+si],al ; 00003134 0000 '..' - add [bx+si],al ; 00003136 0000 '..' - add [bx],bl ; 00003138 001F '..' - daa ; 0000313A 27 0x27 - das ; 0000313B 2F '/' - aaa ; 0000313C 37 '7' - aas ; 0000313D 3F '?' - aas ; 0000313E 3F '?' - aas ; 0000313F 3F '?' - aas ; 00003140 3F '?' - aas ; 00003141 3F '?' - aas ; 00003142 3F '?' - aas ; 00003143 3F '?' - aas ; 00003144 3F '?' - aas ; 00003145 3F '?' - aaa ; 00003146 37 '7' - das ; 00003147 2F '/' - daa ; 00003148 27 0x27 - pop ds ; 00003149 1F '.' - pop ds ; 0000314A 1F '.' - pop ds ; 0000314B 1F '.' - pop ds ; 0000314C 1F '.' - pop ds ; 0000314D 1F '.' - pop ds ; 0000314E 1F '.' - pop ds ; 0000314F 1F '.' - pop ds ; 00003150 1F '.' - db '-16:?????????:61-------' - sub ax,0x700 ; 00003168 2D0007 '-..' - push cs ; 0000316B 0E '.' - adc ax,0x1c1c ; 0000316C 151C1C '...' - sbb al,0x1c ; 0000316F 1C1C '..' - sbb al,0x1c ; 00003171 1C1C '..' - sbb al,0x1c ; 00003173 1C1C '..' - sbb al,0x15 ; 00003175 1C15 '..' - push cs ; 00003177 0E '.' - pop es ; 00003178 07 '.' - - times 4 dw 0x0000 ; 00003179 - 0000317F - push cs ; 00003181 0E '.' - adc [di],dx ; 00003182 1115 '..' - sbb [si],bl ; 00003184 181C '..' - sbb al,0x1c ; 00003186 1C1C '..' - sbb al,0x1c ; 00003188 1C1C '..' - sbb al,0x1c ; 0000318A 1C1C '..' - sbb al,0x1c ; 0000318C 1C1C '..' - sbb [di],dl ; 0000318E 1815 '..' - adc [0xe0e],cx ; 00003190 110E0E0E '....' - push cs ; 00003194 0E '.' - push cs ; 00003195 0E '.' - push cs ; 00003196 0E '.' - push cs ; 00003197 0E '.' - push cs ; 00003198 0E '.' - adc al,0x16 ; 00003199 1416 '..' - sbb [bp+si],bl ; 0000319B 181A '..' - sbb al,0x1c ; 0000319D 1C1C '..' - sbb al,0x1c ; 0000319F 1C1C '..' - sbb al,0x1c ; 000031A1 1C1C '..' - sbb al,0x1c ; 000031A3 1C1C '..' - sbb al,0x1a ; 000031A5 1C1A '..' - sbb [0x1414],dl ; 000031A7 18161414 '....' - adc al,0x14 ; 000031AB 1414 '..' - adc al,0x14 ; 000031AD 1414 '..' - adc al,0x14 ; 000031AF 1414 '..' - add [si],al ; 000031B1 0004 '..' - or [si],cl ; 000031B3 080C '..' - adc [bx+si],dl ; 000031B5 1010 '..' - adc [bx+si],dl ; 000031B7 1010 '..' - adc [bx+si],dl ; 000031B9 1010 '..' - adc [bx+si],dl ; 000031BB 1010 '..' - adc [si],cl ; 000031BD 100C '..' - or [si],al ; 000031BF 0804 '..' - - times 4 dw 0x0000 ; 000031C1 - 000031C7 - or [bp+si],cl ; 000031C9 080A '.',0x0A - or al,0xe ; 000031CB 0C0E '..' - adc [bx+si],dl ; 000031CD 1010 '..' - adc [bx+si],dl ; 000031CF 1010 '..' - adc [bx+si],dl ; 000031D1 1010 '..' - adc [bx+si],dl ; 000031D3 1010 '..' - adc [0xa0c],cl ; 000031D5 100E0C0A '...',0x0A - or [bx+si],cl ; 000031D9 0808 '..' - or [bx+si],cl ; 000031DB 0808 '..' - or [bx+si],cl ; 000031DD 0808 '..' - or [bx+si],cl ; 000031DF 0808 '..' - or cx,[si] ; 000031E1 0B0C '..' - or ax,0x100f ; 000031E3 0D0F10 0x0D,'..' - adc [bx+si],dl ; 000031E6 1010 '..' - adc [bx+si],dl ; 000031E8 1010 '..' - adc [bx+si],dl ; 000031EA 1010 '..' - adc [bx+si],dl ; 000031EC 1010 '..' - prefetchw [si] ; 000031EE 0F0D0C '.',0x0D,'.' - or cx,[bp+di] ; 000031F1 0B0B '..' - or cx,[bp+di] ; 000031F3 0B0B '..' - or cx,[bp+di] ; 000031F5 0B0B '..' - or cx,[bp+di] ; 000031F7 0B0B '..' + db 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F + db 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F + db 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F + db 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F + db 0x00,0x05,0x11,0x1C,0x08,0x0B,0x25,0x28,0x02,0x07,0x1B,0x20,0x0F,0x14,0x28,0x2C + db 0x0C,0x11,0x25,0x2A,0x14,0x1E,0x32,0x36,0x0F,0x13,0x27,0x2C,0x1B,0x20,0x34,0x39 + db 0x06,0x0B,0x1F,0x24,0x13,0x18,0x2C,0x30,0x09,0x0D,0x21,0x26,0x15,0x1A,0x2E,0x33 + db 0x13,0x17,0x2B,0x30,0x1F,0x24,0x38,0x3D,0x0E,0x18,0x2D,0x32,0x20,0x24,0x38,0x3F + db 0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07 + db 0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F + db 0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07 + db 0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F + db 0x00,0x05,0x11,0x1C,0x08,0x0B,0x14,0x28,0x00,0x05,0x11,0x1C,0x08,0x0B,0x14,0x28 + db 0x0E,0x18,0x2D,0x32,0x20,0x24,0x38,0x3F,0x0E,0x18,0x2D,0x32,0x20,0x24,0x38,0x3F + db 0x00,0x05,0x11,0x1C,0x08,0x0B,0x14,0x28,0x00,0x05,0x11,0x1C,0x08,0x0B,0x14,0x28 + db 0x0E,0x18,0x2D,0x32,0x20,0x24,0x38,0x3F,0x0E,0x18,0x2D,0x32,0x20,0x24,0x38,0x3F + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07 + db 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07 + db 0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F + db 0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F + db 0x00,0x05,0x11,0x1C,0x08,0x0B,0x14,0x28,0x0E,0x18,0x2D,0x32,0x20,0x24,0x38,0x3F + db 0x00,0x05,0x08,0x0B,0x0E,0x11,0x14,0x18,0x1C,0x20,0x24,0x28,0x2D,0x32,0x38,0x3F + db 0x00,0x10,0x1F,0x2F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x2F,0x1F,0x10 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x27,0x2F,0x37,0x3F,0x3F,0x3F,0x3F + db 0x3F,0x3F,0x3F,0x3F,0x3F,0x37,0x2F,0x27,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F + db 0x2D,0x31,0x36,0x3A,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3A,0x36,0x31 + db 0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x00,0x07,0x0E,0x15,0x1C,0x1C,0x1C,0x1C + db 0x1C,0x1C,0x1C,0x1C,0x1C,0x15,0x0E,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + db 0x0E,0x11,0x15,0x18,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x18,0x15,0x11 + db 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x14,0x16,0x18,0x1A,0x1C,0x1C,0x1C,0x1C + db 0x1C,0x1C,0x1C,0x1C,0x1C,0x1A,0x18,0x16,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 + db 0x00,0x04,0x08,0x0C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x0C,0x08,0x04 + db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x0A,0x0C,0x0E,0x10,0x10,0x10,0x10 + db 0x10,0x10,0x10,0x10,0x10,0x0E,0x0C,0x0A,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08 + db 0x0B,0x0C,0x0D,0x0F,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x0F,0x0D,0x0C + db 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B x31f9: mov bp,bx ; 000031F9 8BEB '..' mov cx,0x9 ; 000031FB B90900 '...' @@ -6503,7 +5515,7 @@ x3491: cmp dh,[0x484] ; 00003491 3A368404 ':6..' x3499: mov cx,0x533 ; 00003499 B93305 '.3.' mov bl,0x1 ; 0000349C B301 '..' - call x686 ; 0000349E E8E5D1 '...' + call beep ; 0000349E E8E5D1 '...' jmp short x346f ; 000034A1 EBCC '..' cmp al,0x4 ; 000034A3 3C04 '<.' diff --git a/modules/pcjs/lib/debugger.js b/modules/pcjs/lib/debugger.js index 373388520..2c1d8a811 100644 --- a/modules/pcjs/lib/debugger.js +++ b/modules/pcjs/lib/debugger.js @@ -280,7 +280,7 @@ if (DEBUGGER) { FS: 64, FST: 65, FSTP: 66, FSUB: 67, FSUBR: 68, GS: 69, HLT: 70, IDIV: 71, IMUL: 72, IN: 73, INC: 74, INS: 75, INT: 76, INT3: 77, INTO: 78, IRET: 79, JBE: 80, JC: 81, JCXZ: 82, JG: 83, JGE: 84, JL: 85, JLE: 86, JMP: 87, - JNBE: 88, JNC: 89, JNO: 90, JNP: 91, JNS: 92, JNZ: 93, JO: 94, JP: 95, + JA: 88, JNC: 89, JNO: 90, JNP: 91, JNS: 92, JNZ: 93, JO: 94, JP: 95, JS: 96, JZ: 97, LAHF: 98, LAR: 99, LDS: 100, LEA: 101, LEAVE: 102, LES: 103, LFS: 104, LGDT: 105, LGS: 106, LIDT: 107, LLDT: 108, LMSW: 109, LOADALL:110, LOCK: 111, LODSB: 112, LODSW: 113, LOOP: 114, LOOPNZ: 115, LOOPZ: 116, LSL: 117, LSS: 118, LTR: 119, @@ -313,7 +313,7 @@ if (DEBUGGER) { "FS:", "FST", "FSTP", "FSUB", "FSUBR", "GS:", "HLT", "IDIV", "IMUL", "IN", "INC", "INS", "INT", "INT3", "INTO", "IRET", "JBE", "JC", "JCXZ", "JG", "JGE", "JL", "JLE", "JMP", - "JNBE", "JNC", "JNO", "JNP", "JNS", "JNZ", "JO", "JP", + "JA", "JNC", "JNO", "JNP", "JNS", "JNZ", "JO", "JP", "JS", "JZ", "LAHF", "LAR", "LDS", "LEA", "LEAVE", "LES", "LFS", "LGDT", "LGS", "LIDT", "LLDT", "LMSW", "LOADALL","LOCK", "LODSB", "LODSW", "LOOP", "LOOPNZ", "LOOPZ", "LSL", "LSS", "LTR", @@ -747,7 +747,7 @@ if (DEBUGGER) { /* 0x74 */ [Debugger.INS.JZ, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x75 */ [Debugger.INS.JNZ, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x76 */ [Debugger.INS.JBE, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], - /* 0x77 */ [Debugger.INS.JNBE, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], + /* 0x77 */ [Debugger.INS.JA, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x78 */ [Debugger.INS.JS, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], /* 0x79 */ [Debugger.INS.JNS, Debugger.TYPE_IMMREL | Debugger.TYPE_BYTE | Debugger.TYPE_IN], @@ -919,7 +919,7 @@ if (DEBUGGER) { 0x84: [Debugger.INS.JZ, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], 0x85: [Debugger.INS.JNZ, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], 0x86: [Debugger.INS.JBE, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], - 0x87: [Debugger.INS.JNBE, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], + 0x87: [Debugger.INS.JA, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], 0x88: [Debugger.INS.JS, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], 0x89: [Debugger.INS.JNS, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], 0x8A: [Debugger.INS.JP, Debugger.TYPE_IMMREL | Debugger.TYPE_VWORD | Debugger.TYPE_IN | Debugger.TYPE_80386], @@ -2983,8 +2983,7 @@ if (DEBUGGER) { /** * listBreakpoints(aBreak) * - * TODO: We may need to start listing the linear addresses of breakpoints, because - * segmented address can be ambiguous. + * TODO: We may need to start listing linear addresses also, because segmented address can be ambiguous. * * @this {Debugger} * @param {Array} aBreak @@ -5226,7 +5225,7 @@ if (DEBUGGER) { var selCode = this.cpu.segCS.sel; var dbgAddrCall = this.newAddr(); var dbgAddrStack = this.newAddr(this.cpu.getSP(), this.cpu.getSS()); - this.println("stack trace for " + this.hexAddr(dbgAddrStack) + ':'); + this.println("stack trace for " + this.hexAddr(dbgAddrStack)); while (cFrames < nFrames) { var sCall = null, cTests = 256; while ((dbgAddrStack.off >>> 0) < (this.cpu.regLSPLimit >>> 0)) { @@ -5254,7 +5253,7 @@ if (DEBUGGER) { } } if (!sCall) break; - sCall = str.pad(sCall, 56) + ";SS:SP=" + this.hexAddr(dbgAddrStack); + sCall = str.pad(sCall, 50) + ";stack=" + this.hexAddr(dbgAddrStack) + " return=" + this.hexAddr(dbgAddrCall); this.println(sCall); cFrames++; } diff --git a/modules/pcjs/lib/video.js b/modules/pcjs/lib/video.js index 3c3874433..a50cff49f 100644 --- a/modules/pcjs/lib/video.js +++ b/modules/pcjs/lib/video.js @@ -592,21 +592,22 @@ Video.monitorSpecs[ChipSet.MONITOR.EGACOLOR] = { }; /** - * @type {{MonitorSpecs}} + * NOTE: As above, the following values are based purely on trial-and-error, to yield results that fall + * squarely within the bounds of the IBM VGA ROM timing requirements; see the IBM VGA ROM code at C000:024A. * - * TODO: This needs to be filled in with accurate values. + * @type {{MonitorSpecs}} */ Video.monitorSpecs[ChipSet.MONITOR.VGACOLOR] = { - nHorzPeriodsPerSec: 21850, - nHorzPeriodsPerFrame: 364, + nHorzPeriodsPerSec: 16700, + nHorzPeriodsPerFrame: 480, percentHorzActive: 85, - percentVertActive: 96 + percentVertActive: 83 }; /* * EGA Miscellaneous ports and SW1-Sw4 * - * The Card.MISC.CLK_SELECT bits determine which of the EGA board's 4 configuration switches are + * The Card.MISC.CLOCK_SELECT bits determine which of the EGA board's 4 configuration switches are * returned via Card.STATUS0.SWSENSE (when SWSENSE is zero, the switch is closed): * * 0xC: return SW1 @@ -965,7 +966,7 @@ function Card(video, iCard, data, cbMemory) } /* - * MDA Registers + * MDA Registers (ports 0x3B4, 0x3B5, 0x3B8, and 0x3BA) */ Card.MDA = { CRTC: { @@ -988,6 +989,9 @@ Card.MDA = { HDRIVE: 0x01, BWVIDEO: 0x08 }, + /* + * TODO: Add support for parallel port(s) someday.... + */ PRT_DATA: { PORT: 0x3BC }, @@ -1000,7 +1004,7 @@ Card.MDA = { }; /* - * CGA Registers + * CGA Registers (ports 0x3D4, 0x3D5, 0x3D8, 0x3D9, and 0x3DA) */ Card.CGA = { CRTC: { @@ -1030,11 +1034,14 @@ Card.CGA = { }, STATUS: { PORT: 0x3DA, // read-only; same for EGA (although the EGA calls this STATUS1, to distinguish it from STATUS0) - DISP_ENABLE: 0x01, + DISP_RETRACE: 0x01, PEN_TRIGGER: 0x02, PEN_ON: 0x04, VERT_RETRACE: 0x08 // when set, this indicates the CGA is performing a vertical retrace }, + /* + * TODO: Add support for light pen port(s) someday.... + */ CLEAR_PEN: { PORT: 0x3DB }, @@ -1044,7 +1051,7 @@ Card.CGA = { }; /* - * Common CRT hardware registers, accessed via Card.xxA.CRTC.INDX.PORT and Card.xxA.CRTC.DATA.PORT + * Common CRT hardware registers (ports 0x3B4/0x3B5 or 0x3D4/0x3D5) * * NOTE: In this implementation, because we have to make at least two of the registers readable (CURSOR_ADDR_HI and CURSOR_ADDR_LO), * we end up making ALL the registers readable, otherwise we would have to explicitly block any register marked write-only. I don't @@ -1098,10 +1105,19 @@ Card.CRTC = { HORZ_RETRACE_END: 0x05, VERT_TOTAL: 0x06, OVERFLOW: { - INDX: 0x07, - VERT_TOTAL: 0x01 + INDX: 0x07, + VERT_TOTAL_BIT8: 0x01, // bit 8 of register 0x06 + VERT_DISP_END_BIT8: 0x02, // bit 8 of register 0x12 + VERT_RETRACE_START_BIT8:0x04, // bit 8 of register 0x10 + VERT_BLANK_START_BIT8: 0x08, // bit 8 of register 0x15 + LINE_COMPARE_BIT8: 0x10, // bit 8 of register 0x18 + CURSOR_START_BIT8: 0x20, // bit 8 of register 0x0A (EGA only) + VERT_TOTAL_BIT9: 0x20, // bit 9 of register 0x06 (VGA only) + VERT_DISP_END_BIT9: 0x40, // bit 9 of register 0x12 (VGA only, unused on EGA) + VERT_RETRACE_START_BIT9:0x80 // bit 9 of register 0x10 (VGA only, unused on EGA) }, PRESET_ROW_SCAN: 0x08, + /* EGA/VGA CRTC registers 0x09-0x0F are the same as the MDA/CGA CRTC registers defined above */ VERT_RETRACE_START: 0x10, VERT_RETRACE_END: 0x11, VERT_DISP_END: 0x12, @@ -1133,18 +1149,18 @@ if (DEBUGGER) { "START_ADDR_HI","START_ADDR_LO","CURSOR_ADDR_HI","CURSOR_ADDR_LO","LIGHT_PEN_HI","LIGHT_PEN_LO"]; Card.CRTC.EGA_REGS = ["HORZ_TOTAL","HORZ_DISP_END","HORZ_BLANK_START","HORZ_BLANK_END","HORZ_RETRACE_START","HORZ_RETRACE_END", - "VERT_TOTAL","CRTC_OVERFLOW","PRESET_ROW_SCAN","MAX_SCAN_LINE","CURSOR_START","CURSOR_END", + "VERT_TOTAL","OVERFLOW","PRESET_ROW_SCAN","MAX_SCAN_LINE","CURSOR_START","CURSOR_END", "START_ADDR_HI","START_ADDR_LO","CURSOR_ADDR_HI","CURSOR_ADDR_LO","VERT_RETRACE_START","VERT_RETRACE_END", "VERT_DISP_END","OFFSET","UNDERLINE","VERT_BLANK_START","VERT_BLANK_END","MODE_CTRL","LINE_COMPARE"]; } /* - * EGA/VGA Input Status 1 Register + * EGA/VGA Input Status 1 Register (port 0x3DA) * * STATUS1 bit 0 has confusing documentation: the EGA Tech Ref says "Logical 0 indicates the CRT raster is in a * horizontal or vertical retrace interval", whereas the VGA Tech Ref says "Logical 1 indicates a horizontal or - * vertical retrace interval." The name of the status bit suggests that the EGA is right and the VGA is wrong, - * but this needs to be confirmed. + * vertical retrace interval," but then clarifies: "This bit is the real-time status of the INVERTED display enable + * signal". So, instead of calling bit 0 DISP_ENABLE (or more precisely, DISP_ENABLE_INVERTED), it's simply DISP_RETRACE. * * STATUS1 diagnostic bits 5 and 4 are set according to the Card.ATC.PLANES.MUX bits: * @@ -1157,14 +1173,14 @@ if (DEBUGGER) { */ Card.STATUS1 = { PORT: 0x3DA, - DISP_ENABLED: 0x01, // bit 0: logical OR of horizontal and vertical retrace states + DISP_RETRACE: 0x01, // bit 0: logical OR of horizontal and vertical retrace VERT_RETRACE: 0x08, // bit 3: set during vertical retrace interval DIAGNOSTIC: 0x30, // bits 5,4 are controlled by the Card.ATC.PLANES.MUX bits RESERVED: 0xC6 }; /* - * EGA/VGA Attribute Controller Registers (regATCIndx and regATCData) + * EGA/VGA Attribute Controller Registers (port 0x3C0: regATCIndx and regATCData) * * The current ATC INDX value is stored in cardEGA.regATCIndx (including the Card.ATC.INDX_ENABLE bit), and the * ATC DATA values are stored in cardEGA.regATCData. The state of the ATC INDX/DATA flip-flop is stored in fATCData. @@ -1204,7 +1220,7 @@ Card.ATC = { PELWIDTH: 0x40, // bit 6: set for 256-color modes, clear for all other modes COLORSEL: 0x80 // bit 7: set for P5,P4 mapped to bits 1,0 of the Color Select register }, - OVRSCAN: { + OVERSCAN: { INDX: 0x11 // Overscan Color Register }, PLANES: { @@ -1230,11 +1246,11 @@ Card.ATC = { if (DEBUGGER) { Card.ATC.REGS = ["PAL00","PAL01","PAL02","PAL03","PAL04","PAL05","PAL06","PAL07", "PAL08","PAL09","PAL0A","PAL0B","PAL0C","PAL0D","PAL0E","PAL0F", - "MODE","OVRSCAN","PLANES","HORZPAN"]; + "MODE","OVERSCAN","PLANES","HORZPAN"]; } /* - * EGA/VGA Feature Control Register (regFeat) + * EGA/VGA Feature Control Register (port 0x3BA or 0x3DA: regFeat) * * The EGA BIOS writes 0x1 to Card.FEAT_CTRL.BITS and reads Card.STATUS0.FEAT, then writes 0x2 to * Card.FEAT_CTRL.BITS and reads Card.STATUS0.FEAT. The bits from the first and second reads are shifted @@ -1248,14 +1264,14 @@ Card.FEAT_CTRL = { }; /* - * EGA/VGA Miscellaneous Output Register (regMisc) + * EGA/VGA Miscellaneous Output Register (port 0x3C2: regMisc) */ Card.MISC = { PORT_WRITE: 0x3C2, // write port address (EGA and VGA) PORT_READ: 0x3CC, // read port addresss (VGA only) IO_SELECT: 0x01, // 0 sets CRT ports to 0x3Bn, 1 sets CRT ports to 0x3Dn ENABLE_RAM: 0x02, // 0 disables video RAM, 1 enables - CLK_SELECT: 0x0C, // 0x0: 14Mhz I/O clock, 0x4: 16Mhz on-board clock, 0x8: external clock, 0xC: unused + CLOCK_SELECT: 0x0C, // 0x0: 14Mhz I/O clock, 0x4: 16Mhz on-board clock, 0x8: external clock, 0xC: unused DISABLE_DRV: 0x10, // 0 activates internal video drivers, 1 activates feature connector direct drive outputs PAGE_ODD_EVEN: 0x20, // 0 selects the low 64Kb page of video RAM for text modes, 1 selects the high page HORZ_POLARITY: 0x40, // 0 selects positive horizontal retrace @@ -1263,7 +1279,7 @@ Card.MISC = { }; /* - * EGA/VGA Input Status 0 Register (regStatus0) + * EGA/VGA Input Status 0 Register (port 0x3C2: regStatus0) */ Card.STATUS0 = { PORT: 0x3C2, // read-only (aka STATUS0, to distinguish it from PORT_CGA_STATUS) @@ -1275,7 +1291,7 @@ Card.STATUS0 = { }; /* - * VGA Subsystem Enable Register (regVGAEnable) + * VGA Subsystem Enable Register (port 0x3C3: regVGAEnable) */ Card.VGA_ENABLE = { PORT: 0x3C3, @@ -1284,7 +1300,7 @@ Card.VGA_ENABLE = { }; /* - * EGA/VGA Sequencer Registers (regSEQIndx and regSEQData) + * EGA/VGA Sequencer Registers (ports 0x3C4/0x3C5: regSEQIndx and regSEQData) */ Card.SEQ = { INDX: { @@ -1299,7 +1315,7 @@ Card.SEQ = { ASYNC: 0x01, SYNC: 0x02 }, - CLK: { + CLOCKING: { INDX: 0x01, // Sequencer Clocking Mode Register DOTS8: 0x01, // 1: 8 dots; 0: 9 dots BANDWIDTH: 0x02, // 0: CRTC has access 4 out of every 5 cycles (for high-res modes); 1: CRTC has access 2 out of 5 (VGA: reserved) @@ -1335,7 +1351,7 @@ Card.SEQ = { TOTAL_REGS: 0x05 }; -if (DEBUGGER) Card.SEQ.REGS = ["RESET","CLK","MAPMASK","CHARMAP","MODE"]; +if (DEBUGGER) Card.SEQ.REGS = ["RESET","CLOCKING","MAPMASK","CHARMAP","MODE"]; /* * VGA Digital-to-Analog Converter (DAC) Registers (regDACMask, regDACState, regDACAddr, and regDACData) @@ -1348,7 +1364,7 @@ if (DEBUGGER) Card.SEQ.REGS = ["RESET","CLK","MAPMASK","CHARMAP","MODE"]; * * DAC.STATE.PORT and DAC.ADDR.PORT_WRITE can be read at any time and will not interfere with a read or write operation * in progress. To prevent "snow", reading or writing DAC values should be limited to retrace intervals (see regStatus1), - * or by using the SCREEN_OFF bit in the SEQ.CLK register. + * or by using the SCREEN_OFF bit in the SEQ.CLOCKING register. */ Card.DAC = { MASK: { @@ -1371,7 +1387,14 @@ Card.DAC = { }; /* - * EGA/VGA Graphics Controller Registers (regGRCIndx and regGRCData) + * EGA/VGA Graphics Controller Registers (ports 0x3CE/0x3CF: regGRCIndx and regGRCData) + * + * The VGA added Write Mode 3, which is described as follows: + * + * "Each map is written with 8 bits of the value contained in the Set/Reset register for that map + * (the Enable Set/Reset register has no effect). Rotated system microprocessor data is ANDed with the + * Bit Mask register data to form an 8-bit value that performs the same function as the Bit Mask register + * does in write modes 0 and 2." */ Card.GRC = { POS1_PORT: 0x3CC, // EGA only, write-only @@ -1389,7 +1412,7 @@ Card.GRC = { ESRESET: { INDX: 0x01 // ENABLE SET/RESET }, - COLRCMP: { + COLORCMP: { INDX: 0x02 // COLOR COMPARE }, DATAROT: { @@ -1416,7 +1439,8 @@ Card.GRC = { READ_MODE0: 0x00, // read mode 0x0: read map mode READ_MODE1: 0x08, // read mode 0x1: color compare mode EVENODD: 0x10, - SHIFT: 0x20 + SHIFT: 0x20, + COLOR256: 0x40 // VGA only }, MISC: { INDX: 0x06, // MISCELLANEOUS @@ -1428,7 +1452,7 @@ Card.GRC = { MAPB032: 0x08, // MAPB832: 0x0C // }, - COLRDC: { + COLORDC: { INDX: 0x07 // COLOR DON'T CARE }, BITMASK: { @@ -1437,7 +1461,7 @@ Card.GRC = { TOTAL_REGS: 0x09 }; -if (DEBUGGER) Card.GRC.REGS = ["SRESET","ESRESET","COLRCMP","DATAROT","READMAP","MODE","MISC","COLRDC","BITMASK"]; +if (DEBUGGER) Card.GRC.REGS = ["SRESET","ESRESET","COLORCMP","DATAROT","READMAP","MODE","MISC","COLORDC","BITMASK"]; /* * EGA Memory Access Functions @@ -1495,6 +1519,7 @@ if (DEBUGGER) Card.GRC.REGS = ["SRESET","ESRESET","COLRCMP","DATAROT","READMAP", * * These functions, however, don't yet deal with all those subtleties: A0 is currently used only as a "plane select" * bit and set to zero for addressing purposes, meaning that only the EVEN bytes in EGA memory will ever be used. + * TODO: Implement the subtleties. */ /* @@ -1557,6 +1582,18 @@ Card.ACCESS.readByteMode0EvenOdd = function readByteMode0EvenOdd(off, addr) /** * readByteMode1(off, addr) * + * This mode requires us to step through each of the 8 sets of 4 bits in the specified DWORD of video memory, + * returning a 1 wherever all 4 match the Color Compare (COLORCMP) Register and a 0 otherwise. An added wrinkle + * is that the Color Don't Care (COLORDC) Register can specify that any/all/none of the 4 bits must be ignored. + * + * We perform the comparison from most to least significant bit, because that matches how the nColorCompare and + * nColorDontCare masks are initialized; we could have gone either way, but this is more consistent with the rest + * of the component (eg, pixels are drawn across the screen from left to right, starting with the most significant + * bit of each byte). + * + * Also note that, while not well-documented, this mode also affects the internal latches, so we make sure those + * are updated as well. + * * @this {Memory} * @param {number} off * @param {number} [addr] @@ -1565,13 +1602,17 @@ Card.ACCESS.readByteMode0EvenOdd = function readByteMode0EvenOdd(off, addr) Card.ACCESS.readByteMode1 = function readByteMode1(off, addr) { off += this.offset; - var dw = this.adw[off]; - var nColorCompare = this.controller.nColorCompare & this.controller.nColorDontCare; + var dw = this.controller.latches = this.adw[off]; + /* + * Minor optimization: we could pre-mask nColorCompare with nColorDontCare, whenever either register is updated, + * but that's a drop in the bucket compared to all the other work this function must do. + */ + var mask = this.controller.nColorDontCare; + var color = this.controller.nColorCompare & mask; var b = 0, bit = 0x80; while (bit) { - if ((dw & nColorCompare) == nColorCompare) b |= bit; - nColorCompare >>>= 1; - bit >>= 1; + if ((dw & mask) == color) b |= bit; + color >>>= 1; mask >>>= 1; bit >>= 1; } return b; }; @@ -4021,8 +4062,12 @@ Video.prototype.checkMode = function(fForce) break; } - var fSEQDotClock = (card.regSEQData[Card.SEQ.CLK.INDX] & Card.SEQ.CLK.DOTCLOCK); - var nCRTCVertTotal = card.regCRTData[Card.CRTC.EGA.VERT_TOTAL] | ((card.regCRTData[Card.CRTC.EGA.OVERFLOW.INDX] & Card.CRTC.EGA.OVERFLOW.VERT_TOTAL) << 8); + var fSEQDotClock = (card.regSEQData[Card.SEQ.CLOCKING.INDX] & Card.SEQ.CLOCKING.DOTCLOCK); + var nCRTCVertTotal = card.regCRTData[Card.CRTC.EGA.VERT_TOTAL]; + nCRTCVertTotal |= ((card.regCRTData[Card.CRTC.EGA.OVERFLOW.INDX] & Card.CRTC.EGA.OVERFLOW.VERT_TOTAL_BIT8)? 0x100 : 0); + if (card.nCard == Video.CARD.VGA) { + nCRTCVertTotal |= ((card.regCRTData[Card.CRTC.EGA.OVERFLOW.INDX] & Card.CRTC.EGA.OVERFLOW.VERT_TOTAL_BIT9)? 0x200 : 0); + } if (nMode != Video.MODE.UNKNOWN) { if (!(regGRCMisc & Card.GRC.MISC.GRAPHICS)) { @@ -4040,11 +4085,12 @@ Video.prototype.checkMode = function(fForce) // we've already defaulted to 0x0F or 0x10, so determine if it's 0x0D or 0x0E (ie, a 200-row mode) // and then which one (ie, 320 wide or 640 wide). // - if (nCRTCVertTotal > 480) { - nMode = Video.MODE.VGA_640X480; - } - else if (nCRTCVertTotal < 350) { - nMode = (fSEQDotClock? Video.MODE.EGA_320X200 : Video.MODE.EGA_640X200); + if (nCRTCVertTotal < 400) { + if (nCRTCVertTotal < 350) { + nMode = (fSEQDotClock? Video.MODE.EGA_320X200 : Video.MODE.EGA_640X200); + } + } else { + nMode = (this.nMonitorType == ChipSet.MONITOR.MONO? Video.MODE.VGA_640X480_MONO : Video.MODE.VGA_640X480); } if (DEBUG && this.messageEnabled()) { this.printMessage("checkMode(): nCRTCVertTotal=" + nCRTCVertTotal + ", mode=" + str.toHexByte(nMode)); @@ -4895,8 +4941,52 @@ Video.prototype.outATC = function(port, bOut, addrFrom) */ Video.prototype.inStatus0 = function(port, addrFrom) { - var iBit = 3 - ((this.cardEGA.regMisc & Card.MISC.CLK_SELECT) >> 2); // this is the desired SW # (0-3) - var bSWBit = (this.bEGASwitches & (1 << iBit)) << (Card.STATUS0.SWSENSE_SHIFT - iBit); + var bSWBit = 0; + if (this.nCard == Video.CARD.EGA) { + var iBit = 3 - ((this.cardEGA.regMisc & Card.MISC.CLOCK_SELECT) >> 2); // this is the desired SW # (0-3) + bSWBit = (this.bEGASwitches & (1 << iBit)) << (Card.STATUS0.SWSENSE_SHIFT - iBit); + } else { + /* + * The IBM VGA ROM expects the SWSENSE bit to change according to how the DAC is programmed. + * + * At C000:0391, the ROM selects the following array at 0x0454: + * + * db 0x12,0x12,0x12,0x10 + * + * and writes the first 3 bytes to DAC register #0, and then compares SWSENSE to the 4th byte (0x10). + * + * If the 4th byte matches (and I think it should), then the ROM clears the BIOS "monochrome monitor" bit, + * and does the same thing with 5 more arrays: + * + * db 0x14,0x14,0x14,0x10 + * db 0x2D,0x14,0x14,0x00 + * db 0x14,0x2D,0x14,0x00 + * db 0x14,0x14,0x2D,0x00 + * db 0x2D,0x2D,0x2D,0x00 + * + * I've not found any documentation that explains how the SWSENSE bit should reflect changes to the DAC + * in relation to the type of monitor, but it's clear from the ROM BIOS that all 5 of the 4th bytes must + * match SWSENSE after each DAC change, or we get error beeps. + * + * So I will force that result by clearing SWSENSE if any of the three 6-bit DAC values contain 0x2D, and + * setting it otherwise. This hard-coded behavior assumes a color monitor. If you really want to simulate + * a monochrome monitor, then first array will have to miscompare, and the 4th byte of the following arrays + * must match instead: + * + * db 0x04,0x12,0x04,0x10 + * db 0x1E,0x12,0x04,0x00 + * db 0x04,0x2D,0x04,0x00 + * db 0x04,0x16,0x15,0x00 + * db 0x00,0x00,0x00,0x10 + * + * In other words, for the monochrome monitor case, set SWSENSE only when DAC register #0 matches the + * first and last rows. + */ + var dwDAC = this.cardEGA.regDACData[0]; + if ((dwDAC & 0x3f) != 0x2d && (dwDAC & (0x3f << 6)) != (0x2d << 6) && (dwDAC & (0x3f << 12)) != (0x2d << 12)) { + bSWBit |= Card.STATUS0.SWSENSE; + } + } var b = ((this.cardEGA.regStatus0 & ~Card.STATUS0.SWSENSE) | bSWBit); /* * TODO: Figure out where Card.STATUS0.FEAT bits should come from.... @@ -5289,7 +5379,7 @@ Video.prototype.outGRCData = function(port, bOut, addrFrom) this.cardEGA.nSetMapMask = ~Video.aEGAByteToDW[bOut & 0xf]; this.cardEGA.nSetMapBits = this.cardEGA.nSetMapData & ~this.cardEGA.nSetMapMask; break; - case Card.GRC.COLRCMP.INDX: + case Card.GRC.COLORCMP.INDX: this.cardEGA.nColorCompare = Video.aEGAByteToDW[bOut & 0xf] & (0x80808080|0); break; case Card.GRC.DATAROT.INDX: @@ -5302,8 +5392,8 @@ Video.prototype.outGRCData = function(port, bOut, addrFrom) case Card.GRC.MISC.INDX: this.checkMode(false); break; - case Card.GRC.COLRDC.INDX: - this.cardEGA.nColorDontCare = Video.aEGAByteToDW[(bOut & 0xf) ^ 0xf] & (0x80808080|0); + case Card.GRC.COLORDC.INDX: + this.cardEGA.nColorDontCare = Video.aEGAByteToDW[bOut & 0xf] & (0x80808080|0); break; case Card.GRC.BITMASK.INDX: this.cardEGA.nBitMapMask = bOut | (bOut << 8) | (bOut << 16) | (bOut << 24); @@ -5602,7 +5692,7 @@ Video.prototype.inCardStatus = function(card, addrFrom) var b = 0; /* - * NOTE: The CGA bits CGA.STATUS.DISP_ENABLE (0x01) and CGA.STATUS.VERT_RETRACE (0x08) match the EGA definitions, + * NOTE: The CGA bits CGA.STATUS.DISP_RETRACE (0x01) and CGA.STATUS.VERT_RETRACE (0x08) match the EGA definitions, * and they also correspond to the MDA bits MDA.STATUS.HDRIVE (0x01) and MDA.STATUS.BWVIDEO (0x08); I'm not sure why * the MDA uses different designations, but the bits appear to serve the same purpose. * @@ -5613,7 +5703,7 @@ Video.prototype.inCardStatus = function(card, addrFrom) var nElapsedCycles = nCycles - card.nInitCycles; if (nElapsedCycles < 0) nElapsedCycles = 0; // TODO: Determine if this ever happens var nCyclesHorzRemain = nElapsedCycles % card.nCyclesHorzPeriod; - if (nCyclesHorzRemain > card.nCyclesHorzActive) b |= Card.CGA.STATUS.DISP_ENABLE; + if (nCyclesHorzRemain > card.nCyclesHorzActive) b |= Card.CGA.STATUS.DISP_RETRACE; var nCyclesVertRemain = nElapsedCycles % card.nCyclesVertPeriod; if (nCyclesVertRemain > card.nCyclesVertActive) b |= Card.CGA.STATUS.VERT_RETRACE; /* @@ -5660,10 +5750,10 @@ Video.prototype.inCardStatus = function(card, addrFrom) * On the MDA/CGA, to satisfy ROM BIOS testing ("TEST.10"), it's sufficient to do a simple toggle of * bits 0 and 3 on every read. * - * Also, according to http://www.seasip.info/VintagePC/mda.html, on an MDA, bits 7-4 are always ON and bits 2-1 - * are always OFF, hence the "OR" of 0xf0. + * Also, according to http://www.seasip.info/VintagePC/mda.html, on an MDA, bits 7-4 are always ON and + * bits 2-1 are always OFF, hence the "OR" of 0xf0. */ - b = (card.regStatus ^= (Card.CGA.STATUS.DISP_ENABLE | Card.CGA.STATUS.VERT_RETRACE)) | 0xf0; + b = (card.regStatus ^= (Card.CGA.STATUS.DISP_RETRACE | Card.CGA.STATUS.VERT_RETRACE)) | 0xf0; } card.regStatus = b; this.printMessageIO(card.port + 6, null, addrFrom, (card === this.cardEGA? "STATUS1" : "STATUS"), b);