home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
lan
/
critical
/
extenda2.mac
< prev
next >
Wrap
Text File
|
1988-07-15
|
2KB
|
71 lines
; Added support for __PARCLEN, __PARCSIZ, __RETCLEN
;
EXTRN __PARCLEN:FAR
EXTRN __PARCSIZ:FAR
EXTRN __RETCLEN:FAR
;---------------------------------------------------------------------
; This macro is used to obtain the string length of a requested parameter
; The syntax is.......: GET_CLEN <expN>
; Length returned in..: AX
;
; Example.............: GET_CLEN 1 (get string length of 1st para)
;---------------------------------------------------------------------
GET_CLEN MACRO N
MOV AX,N
PUSH AX
CALL __PARCLEN
ADD SP,2
ENDM
;---------------------------------------------------------------------
; This macro is used to obtain the size of memory allocated to a string
; The syntax is.......: GET_CSIZ <expN>
; Length returned in..: AX
;
; Example.............: GET_CSIZ 1 (get memory allocated to 1st para)
;---------------------------------------------------------------------
GET_CSIZ MACRO N
MOV AX,N
PUSH AX
CALL __PARCSIZ
ADD SP,2
ENDM
;---------------------------------------------------------------------
; This macro is used to return a STRING. (Embedded CHR(0)'s)
; The syntax is.....: RET_CLEN <seg_reg>,<off_reg>,<len_reg>
;
; Example...........: RET_CLEN ax,bx,cx
; where: ax = segment
; bx = offset
; cx = length of string
;---------------------------------------------------------------------
RET_CLEN MACRO REG1,REG2,REG3
PUSH REG1
PUSH REG2
PUSH REG3
CALL __RETCLEN
ADD SP,6
ENDM
PUSHREGS MACRO
push bp
mov bp,sp
push ds
push es
push si
push di
ENDM
POPREGS MACRO
pop di
pop si
pop es
pop ds
pop bp
ENDM
;
;** EOF: EXTENDA2.MAC