Added csa4.s and csb4.s
This commit is contained in:
parent
44ff24f085
commit
07f019213d
3 changed files with 65 additions and 0 deletions
|
@ -8,6 +8,8 @@ cmu4.s
|
||||||
com.s
|
com.s
|
||||||
csa2.s
|
csa2.s
|
||||||
csb2.s
|
csb2.s
|
||||||
|
csa4.s
|
||||||
|
csb4.s
|
||||||
cuu.s
|
cuu.s
|
||||||
dup.s
|
dup.s
|
||||||
dvi.s
|
dvi.s
|
||||||
|
|
30
mach/i86/libem/csa4.s
Normal file
30
mach/i86/libem/csa4.s
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||||
|
.define .csa4
|
||||||
|
|
||||||
|
.sect .text
|
||||||
|
.csa4:
|
||||||
|
! bx, descriptor address
|
||||||
|
! ax, dx: index
|
||||||
|
mov cx,(bx) ! default
|
||||||
|
sub ax,2(bx)
|
||||||
|
! ignore high order word; if non-zero, the
|
||||||
|
! case descriptor would not fit anyway
|
||||||
|
cmp ax,6(bx)
|
||||||
|
ja 1f
|
||||||
|
2:
|
||||||
|
sal ax,1
|
||||||
|
add bx,ax
|
||||||
|
mov bx,10(bx)
|
||||||
|
test bx,bx
|
||||||
|
jnz 2f
|
||||||
|
1:
|
||||||
|
mov bx,cx
|
||||||
|
test bx,bx
|
||||||
|
jnz 2f
|
||||||
|
.extern ECASE
|
||||||
|
.extern .fat
|
||||||
|
mov ax,ECASE
|
||||||
|
push ax
|
||||||
|
jmp .fat
|
||||||
|
2:
|
||||||
|
jmp bx
|
33
mach/i86/libem/csb4.s
Normal file
33
mach/i86/libem/csb4.s
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||||
|
.define .csb4
|
||||||
|
|
||||||
|
.sect .text
|
||||||
|
.csb4:
|
||||||
|
!bx: descriptor address
|
||||||
|
!ax, dx: index
|
||||||
|
push (bx) ! default
|
||||||
|
mov cx,2(bx) ! count (ignore high order word, the descriptor
|
||||||
|
! would not fit anyway)
|
||||||
|
1:
|
||||||
|
add bx,6
|
||||||
|
dec cx
|
||||||
|
jl 4f
|
||||||
|
cmp ax,(bx)
|
||||||
|
jne 1b
|
||||||
|
cmp dx,2(bx)
|
||||||
|
jne 1b
|
||||||
|
pop bx
|
||||||
|
mov bx,4(bx)
|
||||||
|
2:
|
||||||
|
test bx,bx
|
||||||
|
jnz 3f
|
||||||
|
.extern ECASE
|
||||||
|
.extern .fat
|
||||||
|
mov ax,ECASE
|
||||||
|
push ax
|
||||||
|
jmp .fat
|
||||||
|
3:
|
||||||
|
jmp bx
|
||||||
|
4:
|
||||||
|
pop bx
|
||||||
|
jmp 2b
|
Loading…
Add table
Reference in a new issue