Grafix24 and Autoboot

Date: 1991
Type: Program
Platform(s): TS 2068
Tags: Printer

Two LKDOS machine-code routines by Steven Gunhouse, printed together in Bob Mitchell’s column as rewrites of code on Mitchell’s Omnibus disk: Grafix24, a screen dump, and Autoboot, which reloads the AUTOSTART program. The download holds each as its own tape file.

Grafix24 (grafsl.C1)

A screen dump for the Larken disk system that copies the TS2068 screen to a wide Epson-compatible printer as single-density bit-image graphics. It is Steven Gunhouse’s rewrite of Bob Mitchell’s Graphics 24 from the Omnibus disk. The code (grafsl.C1, 248 bytes at 24580) installs itself in the LKDOS RAM as a user-defined command, so the dump is then done with PRINT #4: DATA 0. One or two numbers after DATA give the first screen line and the number of lines; a value out of range, or a missing second number, prints the whole screen. It honours the LKDOS LFEED and MARG settings, so the line feed can be switched and the left margin set anywhere, and it no longer needs the print head at the left before each use.

This version is for the Aerco printer interface driver, which is like the LKDOS one; it checks the printer through port 7Fh. The printer codes start at 24755: 27 65 8 for 8/72 inch spacing, 27 42 5 0 1 for bit-image graphics and 27 50 for normal spacing. For inverse printing change 40 to 32 at 24701, or PRINT #4: POKE 16147,288 (296 for normal). If you interrupt a dump, reset the printer, and note that repositioning the print head makes an extra line feed. Enter the code with any machine-code loader; it needs LKDOS.

Autoboot (autobt.Cx)

A short machine-code routine for the Larken disk system that returns control to the AUTOSTART program on a chosen drive whenever it is triggered. RANDOMIZE USR 24495 installs it: an LDIR copies 34 bytes into the LKDOS RAM at 16350 and sets the LKDOS user-command vector to it. When called, it selects the drive, puts the name AUTOSTART in place and sets the LKDOS flag at 2002h to 1, so that everything after the LOAD is automatic. It is Steven Gunhouse’s rewrite of the autoboot code on Bob Mitchell’s Omnibus disk, shorter than the old version and without its slow POKEs.

As printed it selects drive 4. To use another drive, change the byte at 24518 (5FC6h) from 128 to 2 for drive 0, 4 for drive 1, 8 for drive 2 or 16 for drive 3. The code is printed in hex and in decimal, to be entered with a machine-code loader. It needs LKDOS.

Both need LKDOS; the tape files are to be loaded on a TS2068 with the Larken system.

Published in Sinc-Link September/October 1991 (Bob’s Notebook: Rewrite: Autoboot & Grafix24).

Related Articles

This issue, I am presenting rewrites of two utilities which are mainly the work of Steven Gunhouse, our club member in Bowling Green, Ohio.
I received the Sept/Oct Sinc-Link a few days ago. Oh, sorry the copy on the article was too light; I have since replaced my printer ribbon.
In the May issue of Sinc-Link (vol.9 no.3), Bob’s Notebook discusses using the LKDOS user defined command to invoke an NMI-F routine, but points out that he usually gets an error when he does this.

Related Content

Image Gallery

Source Code

grafsl.C1 (Grafix24) - Steven Gunhouse's rewrite of Graphics 24, presented by Bob Mitchell
Sinc-Link (Toronto Timex-Sinclair Users Club), September/October 1991, Bob's Notebook, pages 24-25.
Printed as a hex dump and a decimal dump (both transcribed below; they agree byte for byte).
Printer control codes start at 60B3h/24755d: 27 65 8 (8/72 inch line spacing); 27 42 5 0 1 (single density
bit image graphics); 27 50 (normal line spacing). Inverted printing: change the 28 to 20 h (40 to 32 d) at
607Dh/24701d, or PRINT #4: POKE 16147,288 for INVERSE; 16147,296 for NORMAL.

grafsl.C1 HEX
6004H F3 CD 62 00 21 1D 60 11   600CH E4 3E ED 53 16 20 01 E0
6014H 00 ED B0 C3 BA 00 00 00   601CH 00 21 7A 3F CD 9F 3F CD
6024H A8 3F 21 00 40 3A 02 20   602CH A7 20 22 CD 92 3F 30 05
6034H 6F E6 18 84 67 ED 5B 5D   603CH 5C 1A FE 2C 20 0F CD 92
6044H 3F 28 02 30 08 A7 28 59   604CH 85 FE 19 38 02 3E 18 95
6054H 47 7D E6 07 0F 0F 0F 6F   605CH C5 E5 3A DE 3E 47 A7 28
6064H 07 3E 20 CD B2 3F 10 F9   606CH 21 82 3F CD 9F 3F E1 06
6074H 20 16 80 E5 1E 01 7E 24   607CH A2 28 01 37 CB 13 30 F6
6084H 7B CD B2 3F E1 CB 0A 30   608CH EA 2C 10 E5 20 04 3E 08
6094H 84 67 CD A8 3F C1 10 C0   609CH 21 8A 3F CD 9F 3F CD A8
60A4H 3F 3A 02 20 A7 C0 CD 8D   60ACH 00 C3 BA 00 FF FF FF 03
60B4H 1B 41 08 FF FF FF FF 05   60BCH 1B 2A 05 00 01 FF FF 02
60C4H 1B 32 FF FF FF FF FF E5   60CCH E7 CD 90 00 E1 78 A7 C0
60D4H 79 FE 18 C9 46 23 7E CD   60DCH B2 3F 10 F9 C9 3E 0D CD
60E4H B2 3F 3A DC 3E A7 C8 F5   60ECH DB 7F CB 67 20 FA F1 D3
60F4H 7F C9 00 00 00 00 00 00

grafsl.C1 DEC
24580 243 205 98 0 33 29 96 17      24588 228 62 237 83 22 32 1 224
24596 0 237 176 195 186 0 0 0       24604 0 33 122 63 205 159 63 205
24612 168 63 33 0 64 58 2 32        24620 167 32 34 205 146 63 48 5
24628 111 230 24 132 103 237 91 93  24636 92 26 254 44 32 15 205 146
24644 63 40 2 48 8 167 40 89        24652 133 254 25 56 2 62 24 149
24660 71 125 230 7 15 15 15 111     24668 197 229 58 222 62 71 167 40
24676 7 62 32 205 178 63 16 249     24684 33 130 63 205 159 63 225 6
24692 32 22 128 229 30 1 126 36     24700 162 40 1 55 203 19 48 246
24708 123 205 178 63 225 203 10 48  24716 234 44 16 229 32 4 62 8
24724 132 103 205 168 63 193 16 192 24732 33 138 63 205 159 63 205 168
24740 63 58 2 32 167 192 205 141    24748 0 195 186 0 255 255 255 3
24756 27 65 8 255 255 255 255 5     24764 27 42 5 0 1 255 255 2
24772 27 50 255 255 255 255 255 229 24780 231 205 144 0 225 120 167 192
24788 121 254 24 201 70 35 126 205  24796 178 63 16 249 201 62 13 205
24804 178 63 58 220 62 167 200 245  24812 219 127 203 103 32 250 241 211
24820 127 201 0 0 0 0 0 0

autobt.Cx (Autoboot) - Steven Gunhouse's rewrite of the Omnibus autoboot code, presented by Bob Mitchell
Sinc-Link (Toronto Timex-Sinclair Users Club), September/October 1991, Bob's Notebook, pages 24-25.

autobt.Cx at 5FAF hex. Spaces required after each pair of characters.

F3CD620021C55F11 DE3FED5316200122 00EDB0C3BA003E80
32032021F63F1122 20010A00EDB03E01 320220C3C6004155
544F535441525420

Address 5FC6 holds value 80h (128d) which selects drive 4; if you want the autoboot to operate another
drive, change this to the correct hex value (02=drv0; 04=drv1; 08=drv2; 10=drv3).

autobt.Cx at 24495 dec
Only 34 bytes are moved to the LKDOS RAM (16350-16383).

243,205,98,0,33,197,95,17,222,63,237,83,22,32,1,34,
0,237,176,195,186,0,62,128,50,3,32,33,246,63,17,34,
32,1,10,0,237,176,62,1,50,2,32,195,198,0,65,85,
84,79,83,84,65,82,84,32

To alter the selected drive, change address 24518 (now 128 for drv4) to: 2=drv0; 4=drv1; 8=drv2; 16=drv3.

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.