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 hl,End_String call Print_String ;Print the Terminating String ld c,' ' ld b,7Fh - ' ' MlLp1: call Ser1_Output inc c djnz MlLp1 ld c,' ' or 80h ld b,7Fh - ' ' MlLp2: call Ser1_Output inc c djnz MlLp2 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 ;---------------------------------------------------------------------- ; 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,'$',0 Graph_String: db Cr,Lf,Sp,0CCh,0CDh,0CBh db Cr,Lf,Sp,Sp,0C9h db Cr,Lf,Sp,0CCh,0C8h,0CBh db Cr,Lf,Sp,0CCh,0CEh,0CBh db Cr,Lf,Lf,0C0h,0C3h,Sp,0C0h,0C7h db Cr,Lf,Lf,0C4h,0C7h,Sp,0C4h,0C3h db Cr,Lf,Lf,0C1h,0C2h,Sp,0C1h,0C6h db Cr,Lf,Lf,0C5h,0C6h,Sp,0C5h,0C2h db Cr,Lf,Sp,Sp,0C5h,0C6h db Cr,Lf,Sp,Sp,0C4h,0C7h db Cr,Lf,Sp,Sp,0C1h,0C2h db Cr,Lf,Sp,Sp,0C0h,0C3h db Cr,Lf,Lf,Sp,Sp,0C1h,0CAh,0C2h,Sp,0C5h,0CAh,0C6h,0 End_String: db Esc,'%',Cr,Lf,0 end