Last month I sent a listing from my TS2040 printer and I promised to tell you how I made the fat characters.
The routine is only 39 bytes and can be loaded to any available free memory, such as the printer buffer.
Since this newsletter does not allow for long enough columns to comment the listing, I will describe the process here. If you have questions, I will be glad to answer them at the next meeting.
The first four lines perform a block move and copy the ROM character set to FC00h (64512). This is as high in memory as is convenient, without overwriting the UDG’s.
The next four instructions place the address of the ‘new’ character set into the proper system variable locations.
The remaining instructions comprise a loop that moves each row (byte) of pixel information, one bit to the right. It then ORs (adds) back in the original bit locations. See figure 1. The new data is then re-stored to the new character table.
There is no further action needed by you, as the routine creates and tells the system about the new character table.
To use it, LOAD the routine to any available 39 byte area and call it with a RANDOMIZE USR address. Of course, address is the address you LOADed the routine to.
Have Fun!
Syd
Listing 1
010003 FatChars Ld BC,0300h
1100FC Ld DE,FC00h
21003D Ld HL,3D00h
EDB0 Ldir
2100FC Ld HL,FC00h
FD75FC Ld (IY+FCh),L
FD74FD Ld (IY+FDh),H
FD35FD Dec (IY+FDh)
010003 Ld BC,0300h
7E Loop Ld A,(HL)
5F Ld E,A
CB0F RRC A
B3 Or E
77 Ld (HL),A
0B Dec BC
23 Inc HL
78 Ld A,B
B1 Or C
20F4 Jr NZ, Loop
C9 Ret
Figure 1
Original byte = 0 0 1 1 0 1 0 0 Rotated byte = 0 0 0 1 1 0 1 0 ORed byte = 0 0 1 1 1 1 1 0
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.