Category : Files from Magazines
Archive   : PROGJRNL.ZIP
Filename : PJ4-L4.ASM

 
Output of file : PJ4-L4.ASM contained in archive : PROGJRNL.ZIP
; 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



  3 Responses to “Category : Files from Magazines
Archive   : PROGJRNL.ZIP
Filename : PJ4-L4.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/