20.02.2013 Views

ZX Computings - OpenLibra

ZX Computings - OpenLibra

ZX Computings - OpenLibra

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

the new address (in decimal)<br />

followed by NEWLINE. I spent<br />

many happy minutes stepping<br />

through Clive's ROM after<br />

entering "N" NEWLINE, 0<br />

NEWLINE, followed by a succession<br />

of NEWLINEs. If you<br />

have the patience you could list<br />

and disassemble the ROM<br />

(please send me a copy). Any<br />

area of RAM or ROM can be examined<br />

in this way. If you have<br />

the program operating correctly<br />

the first ten bytes of ROM<br />

should read:<br />

Address<br />

0<br />

1<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

10<br />

Decimal Content<br />

211<br />

253<br />

255<br />

127<br />

195<br />

203<br />

3<br />

42<br />

22<br />

64<br />

The next step was to try some<br />

machine code that actually did<br />

something, so I decided to produce<br />

a short tone for my add on<br />

sound box. (Use any amplifier<br />

of 2 mV sensitivity plugged into<br />

mic. socket of your computer.)<br />

Producing a Bleep<br />

So GOTO 10 followed by<br />

NEWLINE produced 16514<br />

38. The 38 was simply the first<br />

letter A of my REM statement.<br />

The following code was then<br />

written in:<br />

Address Decimal Byte<br />

16514 14<br />

16515 255<br />

16516 6<br />

16517 112<br />

16518 211<br />

16519 255<br />

16520 16<br />

16521 254<br />

16522 6<br />

16523 112<br />

16524 237<br />

16525 64<br />

16526 16<br />

16527 254<br />

16528 13<br />

16529 32<br />

16530 241<br />

16531 201<br />

With some trepidation, I set the<br />

address to 16514 and pressed<br />

"R" NEWLINE. My sound box<br />

bleeped happily and I heaved a<br />

sigh of relief. (Use appendix A<br />

of the Sinclair Manual, if you<br />

want to convert the code to hex<br />

and unravel the bleep program.)<br />

It didn't Crash<br />

I accidentally displayed the<br />

REM statement with the code in<br />

it and to my amazement it<br />

didn't crash. Where it encountered<br />

a naughty code,<br />

clever old Clive's ROM simply<br />

told it to display a question<br />

mark.<br />

Machine code<br />

In Summary<br />

This will definitely be my<br />

favourite method of entering<br />

machine code since:<br />

1. It's immobile and absolute<br />

addressing can be used.<br />

2. It's crash proof even if REM<br />

is displayed.<br />

3. It can be saved.<br />

Using the experimental program<br />

also allows you to step<br />

through and examine the ROM<br />

and incidentally, run parts of<br />

the ROM, to find out start addresses<br />

of useful subroutines.<br />

Use the program and have a<br />

dabble with machine code<br />

yourself.<br />

<strong>ZX</strong> COMPUTING SUMMER 1982 116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!