Title Test of the Graphics for an Mt-70 terminal (5_Dec_84) .z80 aseg org 0100h ;---------------------------------------------------------------------- ; Equates ;-------- ; ;Uart Flags $TxRdy equ 00000100b ;Uart Transmitter Ready Bit $RcvRdy equ 00000001b ;Uart Reciever Ready Bit ;I/O Port Addresses s1data equ 60h ;serial port 1 data (dart1 = con port) s1stat equ 61h ;serial port 1 status ;Ascii Non_Printing Characters Lf equ 0Ah ;Line Feed Cr equ 0Dh ;Carriage Return Esc equ 1Bh ;Escape Code Sp equ 20h ;Space ;---------------------------------------------------------------------- ; Main Line ;---------- ; Main_Line: ld hl,Start_String call Print_String ;Print the Opening String ld hl,Graph_String call Print_String ;Print the Graphics String ld b,5 ld c,0 call Print_Char_N ld hl,End_String call Print_String ;Print the Terminating String jp 0 ;Goto Cp/m ;---------------------------------------------------------------------- ; Print the String Pointed to by the HL Register Pair (5_Dec_84) ;--------------------------------------------------------------- ; Print_String: OsLp1: ld a,(hl) ;While (End_String ne 0) or a ret z ld c,a ; C:= Character to Print call Ser1_Output ; Print the Character inc hl ; Increment the Pointer jr OsLp1 ;---------------------------------------------------------------------- ; Print a Character B_Reg Times (6_Dec_84) ;----------------------------------------- ; Print_Char_N: call Ser1_Output djnz Print_Char_N ret ;---------------------------------------------------------------------- ; Serial Port 1 - Output Drivers (11_Jul_84) ;------------------------------------------- ; Ser1_Output: call Ser1_Output_Status ;Repeat jr z,Ser1_Output ;Until (Transmitter Buffer eq Ready) ld a,c ;(move character to output to Accm) out (s1data),a ;Output the Character ret ;Return Ser1_Output_Status: in a,(S1Stat) and $TxRdy ;If (Transmitter Buffer ne Ready) ret z ; Return 0 ld a,0FFh ;Else ret ; Return 0FFh page ;---------------------------------------------------------------------- ; Data Area ;---------- ; Start_String: db Cr,Lf,Lf,Esc,'U',0 Graph_String: db Cr,Lf,1,0 End_String: db Esc,'X',Cr,Lf,0 end