home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
287_02
/
misc.asm
< prev
next >
Wrap
Assembly Source File
|
1989-05-25
|
1KB
|
53 lines
TITLE MISCELLANEOUS of GDS
page 60,132
.SFCOND
;
IFDEF COLOR
IFDEF HERC
.err both display type defined
ENDIF
else
IFNDEF HERC
HERC equ 0
ENDIF
ENDIF
smo equ 4 ; small model offset value
DGROUP group _DATA
_DATA segment word public 'DATA'
assume ds:DGROUP
_DATA ends
_TEXT segment byte public 'CODE'
assume cs:_TEXT,ds:DGROUP
public _nor_ptr, _exchange
; ret=nor_ptr(ptr);
; int huge *ret,*ptr
;
; return pointer with offset < 10h
_nor_ptr proc near ;public to c
push bp
mov bp,sp
mov ax,[bp+smo]
mov dx,ax
mov cl,4
shr dx,cl
add dx,[bp+smo+2]
and ax,0fh
pop bp
ret
_nor_ptr endp
_exchange proc near ;public to c
mov bx,sp
mov ax,ss:[bx+smo-2]
xchg ah,al
ret
_exchange endp
_TEXT ends
end