Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : SUBDEMO.ASM

 
Output of file : SUBDEMO.ASM contained in archive : TASMSWAN.ZIP
%TITLE "Subroutine demo"

IDEAL
DOSSEG
MODEL small
STACK 256

DATASEG

exitCode DB 0 ;if you want comments

CODESEG

Start:
mov ax,@data
mov ds,ax

mov al,1
mov bl,2
mov cl,3
mov dl,4
call AddRegisters
call AddRegisters
call AddRegisters

Exit:
mov ah,04Ch
mov al,[exitCode]
int 21h

;---------------------------------------------------------
; AddRegisters Sum al,bl,cl, & dl
;---------------------------------------------------------
; Input:
; al,bl,cl,dl = four 8-bit values to add
; Output:
; ax = al + bl + cl + dl
; Registers:
; ax,bh,ch,dh changed
;--------------------------------------------------------
PROC AddRegisters
xor ah,ah
xor bh,bh
xor ch,ch
xor dh,dh
add ax,bx
adc ax,cx
adc ax,dx
ret
ENDP AddRegisters

END Start


  3 Responses to “Category : Assembly Language Source Code
Archive   : TASMSWAN.ZIP
Filename : SUBDEMO.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/