home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
181.img
/
TASM-101.ZIP
/
HELLOPRN.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-10-31
|
691b
|
18 lines
DOSSEG
.MODEL SMALL
.STACK 100h
.DATA
HelloMessage DB 'Hello, world',13,10,12
HELLO_MESSAGE_LENGTH EQU $ - HelloMessage
.CODE
mov ax,@data
mov ds,ax ;set DS to point to the data segment
mov ah,40h ;DOS write to device function #
mov bx,4 ;printer handle
mov cx,HELLO_MESSAGE_LENGTH ;number of characters to print
mov dx,OFFSET HelloMessage ;string to print
int 21h ;print "Hello, world"
mov ah,4ch ;DOS terminate program function #
int 21h ;terminate the program
END