Authors
Publication
Pub Details
Date
Pages
The purpose of this write-up is to explain what was done and why to enable large printer printing of the LIST report after compiling a program with TIMACHINE.
The first obstacle was getting the large printer to print anything. PRINT after opening #3 to “Ip” only gave a dot and two dashes on the screen at about line 1Ø. This was traced to the relocation of the Channels but not changing them when TIMACHINE initialized the location of any BASIC program. Unlike the TIMACHINE for SPECTRUM, the start-up for LKDOS In 2068 mode modifies the channels above “p” to go to locations just above the Channel addresses. When the location of the channel addresses were moved they still pointed to locations that were now occupied by the MC for TIMACHINE. These were changed to point correctly and the length of the MC was increased to include them in the SAVE instruction.
The next problem was with the printout. In TIMACHINE this report is tabulated by “print at ” instructions which the large printer ignored. “Print a space” was substituted for all “print at” instructions except the ones that put the printing at column zero.
The next problem was with the runtime numbers and the addresses of their locations. This was traced to the use of the IX register, which pointed to the location of the runtime addresses in the Display File. Each time the program sent the operation to print anything, LKDOS would reset the IX register for its use and the IX register would be corrupt when TIMACHINE wanted it the way it had left it. What was necessary was PUSH IX before going to LKDOS to print and POP IX before using it for TIMACHINE use. This was done by moving and eliminating instructions in the LIST portion of the TIMACHINE program.
The printing of the simple variables was all right and nothing was needed here except dropping the “print at” in favor of “print a space” which netted three bytes to use for the “PUSHes” and “POPs” that had to be added.
The array variables and strings also required PUSH IX and POP IX additions to get around the corrupt pointer for address locations.
All the foregoing was done using debugger DB4ØXX.C2 program starting with disassembly of “TSTI2.C1, ” previous disassembly of LKDOS and ending with the moving and modifying the LIST portion of “TSTI2.C1. ” The modified program is called “COMPIL.C1” and the BASIC loader is “TSTME.B2.”