Diff for /np2/romimage/SASIBIOS.ASM between versions 1.2 and 1.4

version 1.2, 2004/01/27 03:24:19 version 1.4, 2004/03/19 00:30:01
Line 1 Line 1
 .186  
   
 CODE    SEGMENT          ORG             0
                 ASSUME CS:CODE,DS:nothing,ES:nothing,SS:nothing          USE16
                 ORG 0000H          CPU             8086
   
 FIXCS           equ             2eh  segment .sasi start=0x0000
   
 START:                  retf                                            ; 00                                  retf                                            ; 00
                                 nop                                  nop
                                 nop                                  nop
                                 retf                                            ; 03                                  retf                                            ; 03
Line 16  START:   retf      ; 00 Line 15  START:   retf      ; 00
                                 nop                                  nop
                                 nop                                  nop
                                 db      055h, 0aah, 002h                ; 09                                  db      055h, 0aah, 002h                ; 09
                                 jmp             short sasi_init1        ; 0c                                  jmp             short init1                     ; 0c
                                 nop                                  nop
                                 jmp             short sasi_init2        ; 0f                                  jmp             short init2                     ; 0f
                                 nop                                  nop
                                 retf                                            ; 12                                  retf                                            ; 12
                                 nop                                  nop
                                 nop                                  nop
                                 jmp             short sasi_boot         ; 15                                  jmp             short boot                      ; 15
                                 nop                                  nop
                                 jmp             short sasi_bios         ; 18                                  jmp             short bios                      ; 18
                                 nop                                  nop
                                 retf                                            ; 1b                                  retf                                            ; 1b
                                 nop                                  nop
Line 49  START:   retf      ; 00 Line 48  START:   retf      ; 00
                                 nop                                  nop
                                 nop                                  nop
   
 sasi_init1:             mov             byte ptr [bx], 0d9h  init1:                  mov             byte [bx], 0xd9
                                 retf                                  retf
   
 sasi_init2:             mov             ax, cs  init2:                  mov             ax, cs
                                 mov             word ptr ds:[0044h], offset sasiint                                  mov             word [0x0044], sasiint
                                 mov             ds:[0046h], ax                                  mov             [0x0046], ax
                                 mov             ds:[04b0h], ah                                  mov             [0x04b0], ah
                                 mov             ds:[04b8h], ah                                  mov             [0x04b8], ah
                                 mov             ax, 0300h                                  mov             ax, 0x0300
                                 int             1bh                                  int             0x1b
                                 retf                                  retf
   
 sasi_bios:              cld  bios:                   cld
                                 mov             dx, cs                                  mov             dx, cs
                                 mov             ds, dx                                  mov             ds, dx
                                 mov             cx, 8                                  mov             cx, 8
                                 mov             si, offset sasibiosstr                                  mov             si, sasibiosstr
                                 mov             dx, 07efh                                  mov             dx, 0x07ef
                                 cli                                  cli
                                 rep outsb  .loop:                  lodsb
                                   out             dx, al
                                   loop    .loop
                                 sti                                  sti
                                 pop             ax                                  pop             ax
                                 pop             bx                                  pop             bx
Line 81  sasi_bios:  cld Line 82  sasi_bios:  cld
                                 pop             ds                                  pop             ds
                                 iret                                  iret
   
 sasi_boot:              cmp             al, 0ah  boot:                   cmp             al, 0x0a
                                 je              short sasi_boot2                                  je              short .main
                                 cmp             al, 0bh                                  cmp             al, 0x0b
                                 je              short sasi_boot2                                  je              short .main
                                 retf                                  retf
   
 sasi_boot2:             sub             al, 9  .main:                  sub             al, 9
                                 mov             dl, 0ffh                                  test    [0x055d], al                    ; sasi
                                 test    ds:[055dh], al                  ; sasi                                  je              short .exit
                                 je              short boot_exit  
                                 dec             al                                  dec             al
                                 mov             ah, 06h                                  mov             ah, 0x06
                                 mov             cx, 1fc0h                                  mov             cx, 0x1fc0
                                 mov             es, cx                                  mov             es, cx
                                 mov             bp, bx                                  xor             bp, bp
                                 mov             cx, bx                                  mov             bx, 0x0400
                                 mov             dx, bx                                  xor             cx, cx
                                 mov             bh, 4                                  xor             dx, dx
                                 int             1bh                                  int             0x1b
                                 jc              short boot_exit                                  jc              short .exit
                                 or              al, 80h                                  or              al, 0x80
                                 mov             byte ptr ds:[0584h], al                                  mov             [0x0584], al
                                 db              9ah                                     ; call far                                  db              0x9a                                    ; call far
                                 dw              0                                  dw              0x0000
                                 dw              1fc0h                                  dw              0x1fc0
 boot_exit:              retf  .exit:                  retf
   
   
 ; MS-DOSがこの割り込みを使用する...  ; MS-DOSがこの割り込みを使用する...
   
 sasiint:                push    ax  sasiint:                push    ax
                                 in              al, 82h                                  in              al, 0x82
                                 and             al, 0fdh                                  and             al, 0xfd
                                 cmp             al, 0adh                                  cmp             al, 0xad
                                 je              short sasireadstat                                  je              short .readstat
                                 and             al, 0f9h                                  and             al, 0xf9
                                 cmp             al, 0a1h                                  cmp             al, 0xa1
                                 jne             short sasiinteoi                                  jne             short .eoi
 sasireadstat:   push    ds  .readstat:              push    ds
                                 xor             ax, ax                                  xor             ax, ax
                                 mov             ds, ax                                  mov             ds, ax
                                 or              byte ptr ds:[055fh], 1                                  or              byte [0x055f], 1
                                 mov             al, 0c0h                                  mov             al, 0xc0
                                 out             82h, al                                  out             0x82, al
                                 pop             ds                                  pop             ds
 sasiinteoi:             mov             al, 20h  .eoi:                   mov             al, 0x20
                                 out             08h, al                                  out             0x08, al
                                 mov             al, 0bh                                  mov             al, 0x0b
                                 out             08h, al                                  out             0x08, al
                                 in              al, 08h                                  in              al, 0x08
                                 test    al, al                                  test    al, al
                                 jne             short sasiintexit                                  jne             short .exit
                                 mov             al, 20h                                  mov             al, 0x20
                                 out             00h, al                                  out             0x00, al
 sasiintexit:    pop             ax  .exit:                  pop             ax
                                 iret                                  iret
   
 sasibiosstr             db              "sasibios"  sasibiosstr             db              "sasibios"
   
 CODE    ENDS          ends
         END START  
   

Removed from v.1.2  
changed lines
  Added in v.1.4


RetroPC.NET-CVS <cvs@retropc.net>