; ; HELLO WORLD PROGRAM ; VERSION 0 ; STATUS EQU 1 ;RDT STATUS PORT DATA EQU 2 ;RDT DATA PORT INMASK EQU 0x80 ;STATUS PORT BIT D0 = 7 WHEN KEYBOARD CHARACTER DATA AVAILABLE OUTMASK EQU 0x40 ;STATUS PORT BIT D7 = 6 WHEN TERMINAL BUSY PROCESSING CHARACTER DATA ; ORG 0X0000 ;PROGRAM START ADDRESS ; LXI H, HW_MSG ; AGAIN: MOV A,M ;CHARACTER->A ORA A ;IF A=0 THEN JUMP DONE JZ DONE MOV C,A ;A->C ; ; CHROUT - OUTPUT CHARACTER IN A TO RDT SCREEN ; CHROUT: IN STATUS ;STATUS BYTE -> A ANI OUTMASK ;MASK TERMINAL BUSY BIT D7 JNZ CHROUT ;WAIT IF D7 = 1 - TERMINAL BUSY MOV A,C ;C->A OUT DATA ;SEND CHARACTER TO TEMINAL SCREEN ; INX H ;HL+1->HL JMP AGAIN ;GET NEXT CHARACTER ; DONE: HLT ; ; PROGRAM END ; ; DATA STORAGE ; HW_MSG: DB 25 ;CLEAR SCREEN DM 'Hello World' DB 0 ;