Volume 1 · Number 3 · November 1981

Page 11 of 33

It is possible to have a Basic cassette tape from a TRS-80 disc system, where the starting address is £6A46. The result will be that only the first line will LIST correctly, and the rest will be rubbish. Replace the subtraction values at £0D16 with £4C and at £0D1B with £59.

Don’t forget to use the correct delay settings for your clock speed. For operation at 2Mhz the values required are: £0CC8=£26, £0CDA=£3C, £0CE1= £1D. At 4 Mhz the corresponding values are £53, £81, and £3D. The clock frequency of a standard TRS-80 is 1.7 Mhz, so the programs should run more quickly on a Nascom. The conversion program halts when the screen has filled with tokens that can not be converted. You should make a note of the details, and then press any key to continue

Using The Program With Crystal Basic

The table of equivalent tokens at the end of the article can be used to modify the program so that it will read and convert TRS-80 programs for Crystal Basic. Replace the Nascom tokens in the table starting at £0DD9 with the equivalent Crystal Basic token. You will also have to change the addresses at £0C86, £0C87 and at £0D12, £0D13 to suit the start of text in your version of Crystal Basic; for example, if the program text starts at £2D00, £0C87, £0C87 must be changed to £FC2C and £0D12, £0D13 to £002D. As the first four bytes from the tape overwrite the last four bytes of the interpreter, these will have to be restored before running the program. The line pointer offsets at £0D16 and £0D1B must be also be changed; for text starting at £2D00 the values should be £E9 and £15 respectively. The end of program address should be stored at £0C87, £0C88. The program should then be listable after a warm start.

Reading Machine Code Tapes

The second listing is a routine to read TRS-80 machine code programs. Such a program is first read into a block of memory starting at £1000. The routine then scans the loaded program, testing the checksums and removing the loading addresses, checksum bytes, sync bytes etc. If a checksum error is detected the start address of the block containing it is displayed; try to reload the program at a slightly different volume or tone setting. If all the checksum are correct the routine displays the executions address and returns to Nas-Sys.

You can now use Nas-Dis to disassemble the program. Of course, you will still have a lot of work to do to produce a running program. All calls to the monitor will have to be identified and replaced by their Nascom equivalent. The screen addresses and format will have to be modified. Any program using pixels will have to be changed to take account of the different codes used on the two machines (add £40 to the TRS-80 character and change bits 1,2,3,4 to 2,4,1,3).

Page 11 of 33