Sigh. I really should read what I've written, before I post it. Being in
a
hurry is no good excuse.
I missed out a whole column (the destination address) in the JSRs! And
forgot
to alter the addresses to allow for the different instruction lengths :-(
On Sep 18, 9:05, Pete Turnbull wrote:
Now if he wanted to write it using a subroutine, and
he used the simple
method:
It should be something like:
7 001000 012701 000110 MOV #'H', R1
8 001004 004537 001100 JSR R5, @#PUT
9 001010 012701 000064 MOV #'4', R1
10 001014 004537 001100 JSR R5, @#PUT
11 001020 012701 000130 MOV #'X', R1
12 001024 004537 001100 JSR R5, @#PUT
:
:
35 001100 105767 177564 PUT: TSTB @#XSR
36 001104 100375 BPL PUT
37 001106 010137 177566 MOV R1, @#XBUF
38 001112 000205 RTS R5
However, if it were written using relative addressing,
ie
8 001004 004567 000070 JSR R5, PUT
9 001010 012701 000064 MOV #'4', R1
10 001014 004567 000060 JSR R5, PUT
:
35 001100 105767 177564 PUT: TSTB @#XSR
Apologies for any confusion.
--
Pete Peter Turnbull
Network Manager
University of York