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 ;---------------------------------------------------------------------- ; Main Line ;---------- ; Main_Line: ld hl,Start_String ;HL:= Pointer to Startup String MlLp1: ld a,(hl) ;While (Start_String ne 0) or a jp z,MlSk1 ld c,a ; C:= Character to Output call Ser1_Output ; Print the character inc hl ; Increment the Pointer jp MlLp1 MlSk1: ld b,80h - '@' ;Counter:= Max ld c,'@' ;Character to Output:= 0 MlLp2: call Ser1_Output ;Repeat Print the Character in Graphics inc c ; Increment the Character djnz MlLp2 ;Until (All 256 Codes have been output) ld hl,End_String ;HL:= Pointer to Ending String MlLp3: ld a,(hl) ;While (End_String ne 0) or a jp z,MlSk2 ld c,a ; C:= Character to Print call Ser1_Output ; Print the Character inc hl ; Increment the Pointer jp MlLp3 MlSk2: jp 0 ;---------------------------------------------------------------------- ; 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,Lf,Esc,'$',0 End_String: db Esc,'%',Cr,Lf,0 end