home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
utils
/
asmutl
/
hello.lbr
/
HELLO.ASM
next >
Wrap
Assembly Source File
|
1988-03-05
|
1KB
|
35 lines
;************************************************************************
;* *
;* HELLO.ASM: This program prints "Hello." to the screen. Big *
;* deal, huh? Point is, when the resultant .COM program is run, *
;* it does the SAME thing under CP/M-80 or MS-DOS| Maybe some of *
;* those small, but handy utility routines can now use this so *
;* the programs run under both systems| This example is coded *
;* in 8080 code, although the same thing could be worked out with *
;* 8088 code. Now if we could get this program to also work with *
;* an Apple ][ and a MAC, then we'd have something| Who says *
;* that machine independant assembly language can't be done? *
;* Written by Mark D. Pickerill 24 Feb. 1988. (SYSOP of "Hacker *
;* Heaven" RCP/M at (408) 375-5455.) *
;* *
;************************************************************************
;
RIM: EQU 20H ; Rim opcode
;
ORG 0100H ; Start of tpa
XCHG ; Jmp short
INX D ; To just past the string
MVI C,09H ; Print string function
LXI D,MESSAGE ; Point
CALL 0005H ; Call bdos
RET ; To cp/m
MESSAGE:DB 0DH,0AH,'Hello.$'
NOP ; Space filler
MVI C,1FH ; Push cs,pop ds
CMP D ; Mov dx,
DCX B ; 0b
LXI B,09B4H ; 01: mov ah,09h
CALL 0CD21H ; Int 21, int
DB RIM ; 20 ;terminate program
END