barotto / IBMulator

The IBM PS/1 emulator.
https://barotto.github.io/IBMulator
GNU General Public License v3.0
111 stars 4 forks source link

Machine hangs after second disk of Windows 3.1 setup #4

Closed barotto closed 9 years ago

barotto commented 9 years ago

Machine hangs to a black screen with a Segment Not Present exception (11)

:

[DBG2] cpu | now in Protected Mode
[DBG2] cpu | check_CS(0x05ff): code segment not present
[DBG2] cpu | CPU exception 11
[DBG2] cpu | exception(0x0b): error_code=05fc
[DBG2] cpu | interrupt(): vector = 0b, TYPE = 3, EXT = 0
[DBG2] cpu | interrupt(): INTERRUPT TO INNER PRIVILEGE
[DBG2] cpu | return_protected: return to OUTER PRIVILEGE LEVEL
[DBG2] cpu | call_protected: call gate
[DBG2] cpu | CALL GATE TO MORE PRIVILEGE LEVEL
[DBG2] cpu | LIDT: base 0x000000, limit 0x0000
[DBG2] cpu | interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
[DBG2] cpu | CPU exception 13
[DBG2] cpu | exception(0x0d): error_code=001a
[DBG2] cpu | interrupt(): vector = 0d, TYPE = 3, EXT = 0
[DBG2] cpu | interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
[DBG2] cpu | exception(0x08): error_code=0000
[DBG2] cpu | interrupt(): vector = 08, TYPE = 3, EXT = 0
[DBG2] cpu | interrupt(): vector must be within IDT table limits, IDT.limit = 0x0
[DBG1] cpu | exception(): 3rd (13) exception with no resolution
[DBG2] cpu | Shutdown
barotto commented 9 years ago

CPU executes this piece of code in an infinite loop, triggered by the code segment not present exception at 0B67:091E

0221072449 0B67:091E call far word [bx+48]                                   
0221072457 0070:1151 call 00111B13 ($+9F)                                    
0221072460 0070:11F3 push ax                                                 
0221072461 0070:11F4 mov  ax,ss                                              
0221072461 0070:11F6 cmp  ax,0068                                            
0221072462 0070:11F9 pop  ax                                                 
0221072462 0070:11FA je   00111B1F ($+3)            (down)                   
0221072463 0070:11FF cmp  sp,30AC                                            
0221072464 0070:1203 jne  00111B8E ($+69)           (no jmp)                 
0221072465 0070:1205 cmp  word ss:[30AC],1148                                
0221072466 0070:120C jbe  00111B80 ($+52)           (no jmp)                 
0221072466 0070:120E push bp                                                 
0221072466 0070:120F push cx                                                 
0221072467 0070:1210 push bx                                                 
0221072468 0070:1211 push ax                                                 
0221072468 0070:1212 push ds                                                 
0221072469 0070:1213 lds  bx,ss:[30B4]                                       
0221072471 0070:1218 sub  bx,0006                                            
0221072472 0070:121B lea  bp,[30AE]                                          
0221072472 0070:121F mov  ax,[bp]                                            
0221072473 0070:1222 mov  [bx],ax                                            
0221072473 0070:1224 mov  ax,[bp+02]                                         
0221072475 0070:1227 mov  [bx+02],ax                                         
0221072475 0070:122A mov  ax,[bp+04]                                         
0221072476 0070:122D mov  [bx+04],ax                                         
0221072476 0070:1230 mov  ax,ss:[30AC]                                       
0221072478 0070:1234 sub  ax,1133                                            
0221072478 0070:1237 mov  cl,03                                              
0221072478 0070:1239 div  cl                                                 
0221072480 0070:123B shl  ax,02                                              
0221072480 0070:123E lea  bp,[2964]                                          
0221072481 0070:1242 add  bp,ax                                              
0221072481 0070:1244 mov  ax,[bp]                                            
0221072482 0070:1247 mov  cx,[bp+02]                                         
0221072482 0070:124A lea  bp,[30AC]                                          
0221072483 0070:124E mov  [bp],ax                                            
0221072483 0070:1251 mov  [bp+02],cx                                         
0221072484 0070:1254 mov  [bp+04],bx                                         
0221072485 0070:1257 mov  [bp+06],ds                                         
0221072486 0070:125A pop  ds                                                 
0221072488 0070:125B pop  ax                                                 
0221072489 0070:125C pop  bx                                                 
0221072489 0070:125D pop  cx                                                 
0221072490 0070:125E pop  bp                                                 
0221072491 0070:125F retf                                                    
0221072495 0053:0E51 call 00111DAF ($+63B)                                   
0221072496 0053:148F cli                                                     
0221072497 0053:1490 cld                                                     
0221072498 0053:1491 push ds                                                 
0221072498 0053:1492 mov  ds,cs:[0000]                                       
0221072500 0053:1497 mov  [24CA],ax                                          
0221072500 0053:149A push bp                                                 
0221072501 0053:149B mov  bp,sp                                              
0221072501 0053:149D mov  ax,[bp+0A]                                         
0221072502 0053:14A0 and  ax,BEFF                                            
0221072503 0053:14A3 mov  [24C8],ax                                          
0221072503 0053:14A6 mov  ax,es                                              
0221072503 0053:14A8 xchg [bp+04],ax                                         
0221072505 0053:14AB pop  bp                                                 
0221072505 0053:14AC sub  ax,0E33                                            
0221072506 0053:14AF push cx                                                 
0221072506 0053:14B0 mov  cl,03                                              
0221072506 0053:14B2 div  cl                                                 
0221072507 0053:14B4 pop  cx                                                 
0221072508 0053:14B5 shl  ax,02                                              
0221072509 0053:14B8 mov  [24C2],sp                                          
0221072509 0053:14BC mov  [24C0],ss                                          
0221072510 0053:14C0 push ds                                                 
0221072510 0053:14C1 pop  ss                                                 
0221072512 0053:14C2 mov  sp,[0100]                                          
0221072513 0053:14C6 push ax                                                 
0221072513 0053:14C7 mov  ax,[2F7F]                                          
0221072514 0053:14CA sub  [0100],ax                                          
0221072516 0053:14CE pop  ax                                                 
0221072517 0053:14CF push sp                                                 
0221072517 0053:14D0 cmp  word [30C0],1022                                   
0221072518 0053:14D6 je   00111DFB ($+3)            (down)                   
0221072518 0053:14DB push ax                                                 
0221072519 0053:14DC jmp  005B:0340                                          
0221072522 005B:0340 call 00013FB1 ($+81E)                                   
0221072523 005B:0B61 cli                                                     
0221072524 005B:0B62 mov  ax,ds                                              
0221072524 005B:0B64 mov  es,ax                                              
0221072526 005B:0B66 cmp  word [0134],0003                                   
0221072527 005B:0B6B jc   00013FDB ($+1E)           (down)                   
0221072527 005B:0B8B cmp  word [2F6A],0000                                   
0221072529 005B:0B90 jne  00013FEA ($+8)            (no jmp)                 
0221072529 005B:0B92 pushf                                                   
0221072530 005B:0B93 push word [0148]                                        
0221072531 005B:0B97 push 0C13                                               
0221072531 005B:0B9A mov  ax,cs:[0000]                                       
0221072532 005B:0B9E test byte [2F26],02                                     
0221072534 005B:0BA3 je   00013FFC ($+7)            (down)                   
0221072534 005B:0BAC pusha                                                   
0221072536 005B:0BAD push ax                                                 
0221072539 005B:0BAE push ax                                                 
0221072540 005B:0BAF push 0040                                               
0221072540 005B:0BB1 pop  ds                                                 
0221072542 005B:0BB2 cmp  word es:[2F6A],0000                                
0221072543 005B:0BB8 jne  00014013 ($+9)            (no jmp)                 
0221072544 005B:0BBA mov  [0069],ax                                          
0221072544 005B:0BBD mov  [0067],sp                                          
0221072545 005B:0BC1 jmp  short 00014027 ($+14)     (down)                   
0221072546 005B:0BD7 push 001B                                               
0221072547 005B:0BD9 pop  ds                                                 
0221072550 005B:0BDA mov  si,03FA                                            
0221072550 005B:0BDD mov  di,2A37                                            
0221072550 005B:0BE0 cld                                                     
0221072550 005B:0BE1 movsw                                                   
0221072551 005B:0BE2 movsw                                                   
0221072552 005B:0BE3 movsw                                                   
0221072553 005B:0BE4 push es                                                 
0221072554 005B:0BE5 pop  ds                                                 
0221072556 005B:0BE6 mov  al,8F                                              
0221072556 005B:0BE8 out  70,al                                              
0221072557 005B:0BEA mov  al,09                                              
0221072557 005B:0BEC cmp  word [2F6A],0000                                   
0221072558 005B:0BF1 je   00014045 ($+2)            (down)                   
0221072558 005B:0BF5 out  71,al                                              
0221072560 005B:0BF7 in   al,21                                              
0221072560 005B:0BF9 mov  [2A30],al                                          
0221072560 005B:0BFC mov  al,FF                                              
0221072560 005B:0BFE out  21,al                                              
0221072561 005B:0C00 call 00CB:0000                                          
0221072567 0078:0C5D lidt word [2A31]                                        
0221072572 0078:0C62 int  03                                                 
0221072573 F000:FFF0 jmp  F000:E05B                 RESET                    
0221072575 F000:E05B jmp  000F008A ($-DFD4)         CPU_TEST(up)             
0221072576 F000:008A cli                                                     
0221072577 F000:008B mov  ax,D58D                                            
0221072577 F000:008E out  70,al                                              
0221072578 F000:0090 sahf                                                    
0221072578 F000:0091 jnc  000F00BA ($+27)           (no jmp)                 
0221072578 F000:0093 jne  000F00BA ($+25)           (no jmp)                 
0221072578 F000:0095 jpo  000F00BA ($+23)           (no jmp)                 
0221072579 F000:0097 jns  000F00BA ($+21)           (no jmp)                 
0221072579 F000:0099 lahf                                                    
0221072579 F000:009A mov  cl,05                                              
0221072579 F000:009C shr  ah,cl                                              
0221072580 F000:009E jnc  000F00BA ($+1A)           (no jmp)                 
0221072581 F000:00A0 mov  al,40                                              
0221072581 F000:00A2 shl  al,1                                               
0221072581 F000:00A4 jno  000F00BA ($+14)           (no jmp)                 
0221072581 F000:00A6 xor  ah,ah                                              
0221072582 F000:00A8 sahf                                                    
0221072582 F000:00A9 jbe  000F00BA ($+F)            (no jmp)                 
0221072582 F000:00AB js   000F00BA ($+D)            (no jmp)                 
0221072582 F000:00AD jpe  000F00BA ($+B)            (no jmp)                 
0221072583 F000:00AF lahf                                                    
0221072583 F000:00B0 shr  ah,cl                                              
0221072584 F000:00B2 jc   000F00BA ($+6)            (no jmp)                 
0221072584 F000:00B4 shl  ah,1                                               
0221072584 F000:00B6 jo   000F00BA ($+2)            (no jmp)                 
0221072585 F000:00B8 je   000F00BD ($+3)            (down)                   
0221072585 F000:00BD mov  ax,0040                                            
0221072586 F000:00C0 mov  ds,ax                                              
0221072586 F000:00C2 in   al,64                                              
0221072587 F000:00C4 test al,04                                              
0221072587 F000:00C6 jne  000F00CB ($+3)            POST_RESET(down)         
0221072588 F000:00CB mov  al,8F                                              
0221072589 F000:00CD out  70,al                                              
0221072589 F000:00CF jmp  short 000F00D1 ($+0)      (down)                   
0221072590 F000:00D1 in   al,71                                              
0221072591 F000:00D3 cmp  al,0B                                              
0221072591 F000:00D5 xchg ah,al                                              
0221072591 F000:00D7 je   000F00F8 ($+1F)           (no jmp)                 
0221072592 F000:00D9 cmp  ah,09                                              
0221072592 F000:00DC je   000F00F8 ($+1A)           (down)                   
0221072592 F000:00F8 mov  al,8F                                              
0221072593 F000:00FA out  70,al                                              
0221072593 F000:00FC jmp  short 000F00FE ($+0)      (down)                   
0221072594 F000:00FE sub  al,al                                              
0221072595 F000:0100 out  71,al                                              
0221072595 F000:0102 xchg al,ah                                              
0221072595 F000:0104 cmp  al,0C                                              
0221072596 F000:0106 ja   000F0149 ($+41)           POST_START(no jmp)       
0221072596 F000:0108 mov  si,0114                                            
0221072596 F000:010B add  si,ax                                              
0221072597 F000:010D add  si,ax                                              
0221072597 F000:010F mov  bx,cs:[si]                                         
0221072598 F000:0112 jmp  near bx                   RESET_09                 
0221072598 F000:5371 mov  ax,0040                                            
0221072599 F000:5374 mov  ds,ax                                              
0221072599 F000:5376 mov  ss,[0069]                                          
0221072601 F000:537A mov  sp,[0067]                                          
0221072602 F000:537E pushf                                                   
0221072602 F000:537F cli                                                     
0221072602 F000:5380 in   al,92                                              
0221072603 F000:5382 jmp  short 000F5384 ($+0)      (down)                   
0221072603 F000:5384 and  al,FD                                              
0221072604 F000:5386 out  92,al                                              
0221072604 F000:5388 popf                                                    
0221072605 F000:5389 mov  ax,000D                                            
0221072605 F000:538C out  70,al                                              
0221072606 F000:538E pop  ds                                                 
0221072607 F000:538F pop  es                                                 
0221072608 F000:5390 mov  al,34                                              
0221072608 F000:5392 call 000F2084 ($-3311)         CMOS_READ                
0221072608 F000:2084 pushf                                                   
0221072609 F000:2085 rol  al,1                                               
0221072609 F000:2087 stc                                                     
0221072609 F000:2088 rcr  al,1                                               
0221072610 F000:208A cli                                                     
0221072610 F000:208B out  70,al                                              
0221072610 F000:208D jmp  short 000F208F ($+0)      (down)                   
0221072611 F000:208F in   al,71                                              
0221072612 F000:2091 push ax                                                 
0221072612 F000:2092 mov  al,1E                                              
0221072613 F000:2094 rcr  al,1                                               
0221072613 F000:2096 out  70,al                                              
0221072613 F000:2098 jmp  short 000F209A ($+0)      (down)                   
0221072614 F000:209A in   al,71                                              
0221072614 F000:209C pop  ax                                                 
0221072615 F000:209D popf                                                    
0221072616 F000:209E ret                                                     
0221072617 F000:5395 and  ax,000F                                            
0221072618 F000:5398 mov  bp,sp                                              
0221072618 F000:539A mov  [bp+0F],al                                         
0221072618 F000:539D cmp  ah,al                                              
0221072619 F000:539F popa                                                    
0221072621 F000:53A0 sti                                                     
0221072621 F000:53A1 retf 0002                                               
0221072624 1345:0C13 cli                                                     
0221072625 1345:0C14 xor  ax,ax                                              
0221072625 1345:0C16 mov  es,ax                                              
0221072625 1345:0C18 push si                                                 
0221072625 1345:0C19 push di                                                 
0221072626 1345:0C1A mov  si,2A37                                            
0221072626 1345:0C1D mov  di,03FA                                            
0221072627 1345:0C20 cld                                                     
0221072627 1345:0C21 movsw                                                   
0221072628 1345:0C22 movsw                                                   
0221072629 1345:0C23 movsw                                                   
0221072630 1345:0C24 pop  di                                                 
0221072631 1345:0C25 pop  si                                                 
0221072632 1345:0C26 push ds                                                 
0221072632 1345:0C27 pop  es                                                 
0221072633 1345:0C28 mov  al,[2A30]                                          
0221072633 1345:0C2B out  21,al                                              
0221072634 1345:0C2D cmp  word [2F6A],0000                                   
0221072634 1345:0C32 jne  00014093 ($+F)            (no jmp)                 
0221072635 1345:0C34 push bx                                                 
0221072635 1345:0C35 mov  ah,06                                              
0221072635 1345:0C37 call far word [012C]                                    
0221072637 027A:00CE jmp  short 00002873 ($+3)      (down)                   
0221072639 027A:00D3 push si                                                 
0221072640 027A:00D4 push di                                                 
0221072641 027A:00D5 push cx                                                 
0221072641 027A:00D6 push ds                                                 
0221072642 027A:00D7 push es                                                 
0221072642 027A:00D8 pushf                                                   
0221072643 027A:00D9 cld                                                     
0221072643 027A:00DA push ds                                                 
0221072644 027A:00DB pop  es                                                 
0221072645 027A:00DC push cs                                                 
0221072645 027A:00DD pop  ds                                                 
0221072646 027A:00DE push ax                                                 
0221072646 027A:00DF or   ah,ah                                              
0221072646 027A:00E1 je   000028B5 ($+32)           (no jmp)                 
0221072647 027A:00E3 and  ah,7F                                              
0221072647 027A:00E6 cmp  ah,10                                              
0221072648 027A:00E9 jc   00002892 ($+7)            (down)                   
0221072648 027A:00F2 pushf                                                   
0221072649 027A:00F3 cli                                                     
0221072649 027A:00F4 cmp  word [0020],0000                                   
0221072650 027A:00F9 jne  000028A0 ($+5)            (down)                   
0221072651 027A:0100 push cs                                                 
0221072652 027A:0101 call near word [0014]                                   
0221072653 027A:007D iret                                                    
0221072657 027A:0105 cmp  byte [0030],00                                     
0221072659 027A:010A je   000028B5 ($+9)            (down)                   
0221072659 027A:0115 pop  ax                                                 
0221072660 027A:0116 push ax                                                 
0221072661 027A:0117 mov  al,ah                                              
0221072661 027A:0119 and  ax,007F                                            
0221072661 027A:011C shl  ax,1                                               
0221072661 027A:011E mov  di,ax                                              
0221072662 027A:0120 pop  ax                                                 
0221072662 027A:0121 mov  di,[di+00AE]                                       
0221072663 027A:0125 or   di,di                                              
0221072664 027A:0127 jns  00002903 ($+3A)           (down)                   
0221072664 027A:0163 call near di                                            
0221072665 027A:0371 cli                                                     
0221072666 027A:0372 push cx                                                 
0221072667 027A:0373 cmp  byte [002B],00                                     
0221072668 027A:0378 je   00002B4E ($+34)           (no jmp)                 
0221072669 027A:037A cmp  word [0034],0000                                   
0221072670 027A:037F je   00002B55 ($+34)           (no jmp)                 
0221072670 027A:0381 mov  byte [0044],03                                     
0221072671 027A:0386 call 00002B7C ($+53)                                    
0221072671 027A:03DC push cx                                                 
0221072672 027A:03DD cmp  byte cs:[0031],00                                  
0221072674 027A:03E3 je   00002B8D ($+8)            (no jmp)                 
0221072674 027A:03E5 mov  ax,0002                                            
0221072674 027A:03E8 call 00002BB8 ($+2D)                                    
0221072675 027A:0418 cmp  ax,0001                                            
0221072676 027A:041B mov  ah,02                                              
0221072676 027A:041D je   00002BCB ($+C)            (no jmp)                 
0221072677 027A:041F jc   00002BC9 ($+8)            (no jmp)                 
0221072677 027A:0421 in   al,92                                              
0221072677 027A:0423 test al,02                                              
0221072678 027A:0425 je   00002BE9 ($+22)           (down)                   
0221072678 027A:0449 xor  ax,ax                                              
0221072679 027A:044B ret                                                     
0221072680 027A:03EB jmp  short 00002BB4 ($+27)     (down)                   
0221072682 027A:0414 xor  bl,bl                                              
0221072682 027A:0416 pop  cx                                                 
0221072683 027A:0417 ret                                                     
0221072684 027A:0389 cmp  word [0034],0001                                   
0221072686 027A:038E jne  00002B38 ($+8)            (down)                   
0221072686 027A:0398 or   ax,ax                                              
0221072687 027A:039A jne  00002B4A ($+E)            (no jmp)                 
0221072687 027A:039C mov  ax,0001                                            
0221072688 027A:039F call 00002BB8 ($+76)                                    
0221072688 027A:0418 cmp  ax,0001                                            
0221072689 027A:041B mov  ah,02                                              
0221072690 027A:041D je   00002BCB ($+C)            (down)                   
0221072690 027A:042B in   al,92                                              
0221072691 027A:042D and  al,FD                                              
0221072692 027A:042F or   al,ah                                              
0221072692 027A:0431 jmp  short 00002BD3 ($+0)      (down)                   
0221072692 027A:0433 jmp  short 00002BD5 ($+0)      (down)                   
0221072694 027A:0435 out  92,al                                              
0221072695 027A:0437 xor  cx,cx                                              
0221072695 027A:0439 jmp  short 00002BDB ($+0)      (down)                   
0221072696 027A:043B in   al,92                                              
0221072697 027A:043D and  al,02                                              
0221072697 027A:043F cmp  al,ah                                              
0221072697 027A:0441 loopne 00002BD9 ($-A)                                   
0221072698 027A:0443 jne  00002BE9 ($+4)            (no jmp)                 
0221072698 027A:0445 mov  ax,0001                                            
0221072698 027A:0448 ret                                                     
0221072699 027A:03A2 dec  byte [0044]                                        
0221072701 027A:03A6 jne  00002B26 ($-22)           (up)                     
0221072702 027A:0386 call 00002B7C ($+53)                                    
0221072703 027A:03DC push cx                                                 
0221072704 027A:03DD cmp  byte cs:[0031],00                                  
0221072705 027A:03E3 je   00002B8D ($+8)            (no jmp)                 
0221072705 027A:03E5 mov  ax,0002                                            
0221072706 027A:03E8 call 00002BB8 ($+2D)                                    
0221072706 027A:0418 cmp  ax,0001                                            
0221072707 027A:041B mov  ah,02                                              
0221072708 027A:041D je   00002BCB ($+C)            (no jmp)                 
0221072708 027A:041F jc   00002BC9 ($+8)            (no jmp)                 
0221072708 027A:0421 in   al,92                                              
0221072708 027A:0423 test al,02                                              
0221072709 027A:0425 je   00002BE9 ($+22)           (no jmp)                 
0221072709 027A:0427 jmp  short 00002BE5 ($+1C)     (down)                   
0221072710 027A:0445 mov  ax,0001                                            
0221072711 027A:0448 ret                                                     
0221072712 027A:03EB jmp  short 00002BB4 ($+27)     (down)                   
0221072714 027A:0414 xor  bl,bl                                              
0221072715 027A:0416 pop  cx                                                 
0221072715 027A:0417 ret                                                     
0221072716 027A:0389 cmp  word [0034],0001                                   
0221072718 027A:038E jne  00002B38 ($+8)            (down)                   
0221072719 027A:0398 or   ax,ax                                              
0221072719 027A:039A jne  00002B4A ($+E)            (down)                   
0221072720 027A:03AA dec  word [0034]                                        
0221072722 027A:03AE mov  ax,0001                                            
0221072722 027A:03B1 xor  bl,bl                                              
0221072722 027A:03B3 pop  cx                                                 
0221072723 027A:03B4 ret                                                     
0221072724 027A:0165 push cs                                                 
0221072725 027A:0166 call near word [0014]                                   
0221072726 027A:007D iret                                                    
0221072728 027A:016A pop  es                                                 
0221072729 027A:016B pop  ds                                                 
0221072730 027A:016C pop  cx                                                 
0221072731 027A:016D pop  di                                                 
0221072731 027A:016E pop  si                                                 
0221072732 027A:016F retf                                                    
0221072734 1345:0C3B dec  word [2A3D]                                        
0221072736 1345:0C3F pop  bx                                                 
0221072737 1345:0C40 jmp  short 00014097 ($+5)      (down)                   
0221072738 1345:0C47 push es                                                 
0221072738 1345:0C48 mov  ax,0040                                            
0221072739 1345:0C4B mov  es,ax                                              
0221072739 1345:0C4D and  byte es:[007B],DF                                  
0221072741 1345:0C53 mov  al,[2C70]                                          
0221072742 1345:0C56 or   es:[007B],al                                       
0221072744 1345:0C5B pop  es                                                 
0221072745 1345:0C5C ret                                                     
0221072746 1345:0343 pop  ax                                                 
0221072747 1345:0344 push word [24C0]                                        
0221072748 1345:0348 push word [24C2]                                        
0221072749 1345:034C push ds                                                 
0221072749 1345:034D push word [24C8]                                        
0221072751 1345:0351 push cs                                                 
0221072751 1345:0352 push 0394                                               
0221072752 1345:0355 xchg bx,ax                                              
0221072752 1345:0356 and  byte [24C9],FD                                     
0221072753 1345:035B push word [24C8]                                        
0221072754 1345:035F sub  sp,0004                                            
0221072755 1345:0362 push bp                                                 
0221072755 1345:0363 mov  bp,sp                                              
0221072755 1345:0365 push ax                                                 
0221072756 1345:0366 push es                                                 
0221072756 1345:0367 xor  ax,ax                                              
0221072757 1345:0369 mov  es,ax                                              
0221072758 1345:036B mov  ax,es:[bx+02]                                      
0221072759 1345:036F cmp  [0148],ax                                          
0221072760 1345:0373 je   000137CE ($+9)            (no jmp)                 
0221072760 1345:0375 mov  [bp+04],ax                                         
0221072761 1345:0378 mov  ax,es:[bx]                                         
0221072761 1345:037B jmp  short 000137D9 ($+C)      (down)                   
0221072762 1345:0389 mov  [bp+02],ax                                         
0221072763 1345:038C pop  es                                                 
0221072764 1345:038D pop  ax                                                 
0221072765 1345:038E pop  bp                                                 
0221072765 1345:038F xchg bx,ax                                              
0221072766 1345:0390 mov  ax,[24CA]                                          
0221072766 1345:0393 iret                                                    
0221072768 F000:237E push ax                                                 
0221072769 F000:237F push bx                                                 
0221072770 F000:2380 mov  al,0B                                              
0221072770 F000:2382 out  20,al                                              
0221072770 F000:2384 jmp  short 000F2386 ($+0)      (down)                   
0221072771 F000:2386 in   al,20                                              
0221072772 F000:2388 mov  ah,al                                              
0221072772 F000:238A or   al,ah                                              
0221072772 F000:238C jne  000F2392 ($+4)            (no jmp)                 
0221072772 F000:238E mov  ah,FF                                              
0221072773 F000:2390 jmp  short 000F23C1 ($+2F)     (down)                   
0221072773 F000:23C1 pop  bx                                                 
0221072774 F000:23C2 push ds                                                 
0221072775 F000:23C3 call 000F2121 ($-2A5)          SET_DS_TO_40h            
0221072775 F000:2121 mov  ds,cs:[2127]                                       
0221072777 F000:2126 ret                                                     
0221072778 F000:23C6 mov  [006B],ah                                          
0221072780 F000:23CA pop  ds                                                 
0221072781 F000:23CB pop  ax                                                 
0221072781 F000:23CC iret                                                    
0221072783 1345:0394 pop  ds                                                 
0221072784 1345:0395 pushf                                                   
0221072785 1345:0396 cli                                                     
0221072785 1345:0397 cld                                                     
0221072785 1345:0398 mov  [24CA],ax                                          
0221072786 1345:039B pop  ax                                                 
0221072786 1345:039C pop  word [24C2]                                        
0221072787 1345:03A0 pop  word [24C0]                                        
0221072788 1345:03A4 pop  word [0100]                                        
0221072789 1345:03A8 push ax                                                 
0221072790 1345:03A9 call 00013EB0 ($+6B4)                                   
0221072790 1345:0A60 cli                                                     
0221072792 1345:0A61 cmp  word [0134],0003                                   
0221072792 1345:0A66 jc   00013EC0 ($+8)            (down)                   
0221072793 1345:0A70 mov  ax,0040                                            
0221072794 1345:0A73 mov  es,ax                                              
0221072794 1345:0A75 or   byte es:[007B],20                                  
0221072796 1345:0A7B cmp  byte [2B32],00                                     
0221072797 1345:0A80 je   00013ED5 ($+3)            (down)                   
0221072797 1345:0A85 push bx                                                 
0221072798 1345:0A86 cmp  word [2A3D],0000                                   
0221072800 1345:0A8B je   00013EF1 ($+14)           (down)                   
0221072800 1345:0AA1 mov  ah,05                                              
0221072801 1345:0AA3 call far word [012C]                                    
0221072803 027A:00CE jmp  short 00002873 ($+3)      (down)                   
0221072805 027A:00D3 push si                                                 
0221072806 027A:00D4 push di                                                 
0221072806 027A:00D5 push cx                                                 
0221072807 027A:00D6 push ds                                                 
0221072808 027A:00D7 push es                                                 
0221072808 027A:00D8 pushf                                                   
0221072809 027A:00D9 cld                                                     
0221072809 027A:00DA push ds                                                 
0221072809 027A:00DB pop  es                                                 
0221072810 027A:00DC push cs                                                 
0221072811 027A:00DD pop  ds                                                 
0221072812 027A:00DE push ax                                                 
0221072812 027A:00DF or   ah,ah                                              
0221072812 027A:00E1 je   000028B5 ($+32)           (no jmp)                 
0221072812 027A:00E3 and  ah,7F                                              
0221072813 027A:00E6 cmp  ah,10                                              
0221072813 027A:00E9 jc   00002892 ($+7)            (down)                   
0221072814 027A:00F2 pushf                                                   
0221072815 027A:00F3 cli                                                     
0221072815 027A:00F4 cmp  word [0020],0000                                   
0221072816 027A:00F9 jne  000028A0 ($+5)            (down)                   
0221072817 027A:0100 push cs                                                 
0221072818 027A:0101 call near word [0014]                                   
0221072819 027A:007D iret                                                    
0221072823 027A:0105 cmp  byte [0030],00                                     
0221072824 027A:010A je   000028B5 ($+9)            (down)                   
0221072825 027A:0115 pop  ax                                                 
0221072826 027A:0116 push ax                                                 
0221072826 027A:0117 mov  al,ah                                              
0221072827 027A:0119 and  ax,007F                                            
0221072827 027A:011C shl  ax,1                                               
0221072827 027A:011E mov  di,ax                                              
0221072827 027A:0120 pop  ax                                                 
0221072828 027A:0121 mov  di,[di+00AE]                                       
0221072829 027A:0125 or   di,di                                              
0221072829 027A:0127 jns  00002903 ($+3A)           (down)                   
0221072830 027A:0163 call near di                                            
0221072831 027A:0336 cli                                                     
0221072832 027A:0337 push cx                                                 
0221072833 027A:0338 cmp  byte [002B],01                                     
0221072834 027A:033D jne  00002B04 ($+25)           (no jmp)                 
0221072834 027A:033F mov  byte [0044],03                                     
0221072835 027A:0344 cmp  word [0034],0000                                   
0221072837 027A:0349 je   00002AF2 ($+7)            (no jmp)                 
0221072837 027A:034B call 00002B7C ($+8E)                                    
0221072837 027A:03DC push cx                                                 
0221072838 027A:03DD cmp  byte cs:[0031],00                                  
0221072840 027A:03E3 je   00002B8D ($+8)            (no jmp)                 
0221072840 027A:03E5 mov  ax,0002                                            
0221072840 027A:03E8 call 00002BB8 ($+2D)                                    
0221072841 027A:0418 cmp  ax,0001                                            
0221072842 027A:041B mov  ah,02                                              
0221072842 027A:041D je   00002BCB ($+C)            (no jmp)                 
0221072842 027A:041F jc   00002BC9 ($+8)            (no jmp)                 
0221072843 027A:0421 in   al,92                                              
0221072843 027A:0423 test al,02                                              
0221072843 027A:0425 je   00002BE9 ($+22)           (no jmp)                 
0221072844 027A:0427 jmp  short 00002BE5 ($+1C)     (down)                   
0221072844 027A:0445 mov  ax,0001                                            
0221072845 027A:0448 ret                                                     
0221072846 027A:03EB jmp  short 00002BB4 ($+27)     (down)                   
0221072848 027A:0414 xor  bl,bl                                              
0221072849 027A:0416 pop  cx                                                 
0221072849 027A:0417 ret                                                     
0221072850 027A:034E or   ax,ax                                              
0221072851 027A:0350 jne  00002B00 ($+E)            (down)                   
0221072851 027A:0360 inc  word [0034]                                        
0221072853 027A:0364 mov  ax,0001                                            
0221072854 027A:0367 xor  bl,bl                                              
0221072854 027A:0369 pop  cx                                                 
0221072854 027A:036A ret                                                     
0221072855 027A:0165 push cs                                                 
0221072856 027A:0166 call near word [0014]                                   
0221072857 027A:007D iret                                                    
0221072860 027A:016A pop  es                                                 
0221072861 027A:016B pop  ds                                                 
0221072862 027A:016C pop  cx                                                 
0221072862 027A:016D pop  di                                                 
0221072864 027A:016E pop  si                                                 
0221072864 027A:016F retf                                                    
0221072866 1345:0AA7 inc  word [2A3D]                                        
0221072868 1345:0AAB pop  bx                                                 
0221072869 1345:0AAC pushf                                                   
0221072870 1345:0AAD pop  ax                                                 
0221072870 1345:0AAE and  ax,BFFF                                            
0221072870 1345:0AB1 push ax                                                 
0221072871 1345:0AB2 jmp  short 00013F05 ($+1)      (down)                   
0221072871 1345:0AB5 push cs                                                 
0221072872 1345:0AB6 call 00013F04 ($-5)                                     
0221072873 1345:0AB4 iret                                                    
0221072875 1345:0AB9 smsw ax                                                 
0221072876 1345:0ABC or   ax,0001                                            
0221072877 1345:0ABF cmp  word [0134],0002                                   
0221072878 1345:0AC4 je   00013F25 ($+F)            (down)                   
0221072879 1345:0AD5 lgdt word [0110]                                        
0221072882 1345:0ADA lidt word [011C]                                        
0221072884 1345:0ADF lmsw ax                                                 
0221072884 1345:0AE2 jmp  0078:0B0E                                          
0221072886 0078:0B0E mov  ax,0068                                            
0221072887 0078:0B11 mov  ss,ax                                              
0221072888 0078:0B13 mov  ax,004B                                            
0221072889 0078:0B16 mov  ds,ax                                              
0221072890 0078:0B18 mov  ax,0038                                            
0221072890 0078:0B1B lldt ax                                                 
0221072893 0078:0B1E mov  ax,0008                                            
0221072894 0078:0B21 mov  es,ax                                              
0221072896 0078:0B23 push si                                                 
0221072896 0078:0B24 mov  si,0088                                            
0221072896 0078:0B27 mov  byte es:[si+05],E1                                 
0221072897 0078:0B2C ltr  si                                                 
0221072900 0078:0B2F pop  si                                                 
0221072901 0078:0B30 push ds                                                 
0221072901 0078:0B31 pop  es                                                 
0221072903 0078:0B32 cmp  byte [2A41],00                                     
0221072904 0078:0B37 je   00013F90 ($+7)            (down)                   
0221072905 0078:0B40 mov  ax,sp                                              
0221072905 0078:0B42 push 004B                                               
0221072906 0078:0B44 push ax                                                 
0221072907 0078:0B45 pushf                                                   
0221072907 0078:0B46 pop  ax                                                 
0221072908 0078:0B47 or   ah,30                                              
0221072909 0078:0B4A push ax                                                 
0221072909 0078:0B4B push 005B                                               
0221072910 0078:0B4D push 0B51                                               
0221072910 0078:0B50 iret                                                    
0221072917 005B:0B51 cmp  word [0134],0003                                   
0221072918 005B:0B56 jc   00013FB0 ($+8)            (down)                   
0221072919 005B:0B60 ret                                                     
0221072921 005B:03AC jmp  0053:14E1                                          
0221072923 0053:14E1 pop  ax                                                 
0221072925 0053:14E2 mov  ss,[24C0]                                          
0221072926 0053:14E6 mov  sp,[24C2]                                          
0221072927 0053:14EA push bp                                                 
0221072928 0053:14EB mov  bp,sp                                              
0221072928 0053:14ED and  word [bp+0A],0300                                  
0221072930 0053:14F2 or   [bp+0A],ax                                         
0221072931 0053:14F5 pop  bp                                                 
0221072932 0053:14F6 mov  ax,[24CA]                                          
0221072932 0053:14F9 pop  ds                                                 
0221072934 0053:14FA pop  es                                                 
0221072936 0053:14FB iret