CP/M M80

       Title  "Hello, World!"
; Program:    HELLOW.MAC
; Author:     Brian K. Durham   [bdurham@metronet.com]
; Date:       3-21-96
; Enviroment: M80 (Microsoft Macro Assembler) source for CP/M
       ORG    0100H
Print: LD     HL,10H
       PUSH   HL
       LD     DE,MSG
       LD     C,09H    ; CP/M write string to console call
       CALL   0005H
       POP    HL       ; Get loop counter
       DEC    HL       ;   and decriment it
       PUSH   HL       ; Put back on stack

       LD     A,L
       JR     NZ, LOOP ; Loop while not zero

       POP    HL       ; Clean up stack

       LD     C,00H    ; CP/M system reset call - shut down
       CALL   0005H

       HALT            ; This code is never reached

       TEXT   "Hello, World!"
       DB     0Ah
       DB     "$"      ; Line terminator
       ENDM   Print

submitted by: bdurham@metronet.com (Brian Durham)