SimonGoldsworthy
Member
I thought I'd seen #conv_akku1 somewhere before - it's in the back of the Berger book which shows some Step 5 converted to Step 7 and then also shows the optimised program.
PeterW said:you want to introduce him to the wonderful world of the ANY pointer..
Peter Nachtwey said:I use to use the working area technique back in the days of the 8085 when indirect addressing was messy and not very fast. The debug tools weren't up to the task either.
bri@zf said:I was considering purchasing the Berger book. How do you like it? It seems like about the only one that I can find by searching online. Does anyone have any other suggestions?
L DB253.DBW 66 // Current Running Part No.
T #Current_Part
L DB244.DBW 2 // Last Running Part No.
==I
JC End // If Same then End
L 3
*I // Calculate address to store last
L 20 // settings for previous part
+I
SLW 4 // Turn into pointer and store in AR1
LAR1
L DBW 34 // Save last settings in correct DW's
T DBW [AR1,P#0.0]
L DBW 36
T DBW [AR1,P#2.0]
L DBW 38
T DBW [AR1,P#4.0]
L #Current_Part // Recover new part no and update last running
T DBW 2
L 3 // Calculate address to recover last
*I // settings for new part
L 20
+I
SLW 4 // Turn into pointer and store in AR1
LAR1
L DBW [AR1,P#0.0] // Recover new settings from correct DW's
T DBW 34
L DBW [AR1,P#2.0]
T DBW 36
L DBW [AR1,P#4.0]
T DBW 38
End: NOP 0
SimonGoldsworthy said:Ron the bon - if you are new to indirect addressing/pointers etc. then you should use SLD rather than SLW. Have you got the book by Berger ? If not then I recommend you get it.