added cmi4.s

This commit is contained in:
ceriel 1987-08-13 11:09:24 +00:00
parent 3d90e41a7f
commit e571911b1b
2 changed files with 29 additions and 0 deletions

View file

@ -3,6 +3,7 @@ adi.s
and.s
cii.s
cms.s
cmi4.s
cmu4.s
com.s
csa2.s

28
mach/i86/libem/cmi4.s Normal file
View file

@ -0,0 +1,28 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define .cmi4
.sect .text
.cmi4:
pop bx ! return address
pop cx
pop dx
pop ax
push si
mov si,sp
xchg bx,2(si)
pop si
cmp bx,dx
jg 1f
jl 2f
cmp ax,cx
ja 1f
je 3f
2:
mov ax,-1
ret
3:
xor ax,ax
ret
1:
mov ax,1
ret