home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
progjorn
/
pj_5_6.arc
/
PJ4-L4.ASM
< prev
next >
Wrap
Assembly Source File
|
1987-10-12
|
896b
|
32 lines
; Program to accompany Michael Abrash's code. Code submitted to make
; a point illustrating a letter to Michael
; Listing 4.
; Copyright by John Navas.
cseg SEGMENT
ASSUME cs:cseg
mproc MACRO ; for local names
LOCAL locs,field1,field2,loc1,loc
locs STRUC ; local storage on stack
field1 DW ?
field2 DW ?
locs ENDS
loc1 EQU SIZE locs + 1 AND -2 ; even length
loc EQU [bp-loc1] ; negative offset from bp
sub PROC
push bp ; save old bp
mov bp,sp ; setup new bp
sub sp,loc1 ; allocate local storage
mov loc[field1],1 ; access local storage
mov loc[field2],2
mov sp,bp ; deallocate storage
pop bp ; restore old bp
ret ; return to caller
sub ENDP
ENDM ; mproc may be reused
mproc ; expand local names
DB 2000h - ( $ - cseg ) DUP( 0 )
call sub ; forced by DB to 2000h
cseg ENDS
END