How do I write the JMP command in a program?
|
12-11-2014, 12:51 PM
Post: #1
|
|||
|
|||
How do I write the JMP command in a program?
I've started inputting the IEEE 754 conversion program found on here but can't figure out how to add the JMP command.
First occurence required is - JMP ZeroF, shortly after there's a JMP SpecF. I'm doing this on the WP34s itself not opn the emulator. Can anyone help? Cheers Roger |
|||
12-11-2014, 01:21 PM
(This post was last modified: 12-11-2014 01:27 PM by Dieter.)
Post: #2
|
|||
|
|||
RE: How do I write the JMP command in a program?
(12-11-2014 12:51 PM)Roger Ward Wrote: I've started inputting the IEEE 754 conversion program found on here What program do you refer to? Is it this one in the old forum? [wp34s] Converting to/from IEEE 754 Binary64 (Double Precision) (12-11-2014 12:51 PM)Roger Ward Wrote: but can't figure out how to add the JMP command. Sure - there is no JMP command. ;-) JMP is a shorcut generated by the 34s assembler. The actual program uses SKIP (forward jump) or BACK (backward jump) instead, stating the number of skipped lines. Since these numbers may change during editing, the assembler has this handy JMP command that allows jumping to symbolic labels. Take a look at the listing. In the left column you will notice some labels: ZeroF, SpecF, InfF, ZeroI, SpecI and InfI. Whenever a JMP to one of these labels occurs, you could count the number of program lines between that point and the target label and insert a SKIP command. So if I got it right, JMP ZeroF would be a SKIP 044, because there are 44 lines between the JMP and the respective label. Of course that's cumbersome and error prone. Much easier: use regular labels like LBL 01, LBL 02, LBL 03 at the position of ZeroF, SpecF, InfF etc. and replace the JMP commands with simple GTOs. Example: Code:
And finally you could also use the listing "as is", feed it to the assembler and transfer the result to your hardware 34s. Dieter |
|||
12-11-2014, 01:40 PM
Post: #3
|
|||
|
|||
RE: How do I write the JMP command in a program?
Dieter
Yes, that's the program and thanks for your clear explanation! I'm not a programmer so this is all new to me. Will keep going now. Cheers Rogr |
|||
12-11-2014, 02:16 PM
Post: #4
|
|||
|
|||
RE: How do I write the JMP command in a program?
(12-11-2014 01:40 PM)Roger Ward Wrote: I'm not a programmer so this is all new to me. OK, in this case a complete "translation" may be helpful. There are some other lines that have to be entered differently from what the assembler-generated listing says. Code:
This should look close to what you see in the display. Dieter |
|||
12-11-2014, 03:53 PM
Post: #5
|
|||
|
|||
RE: How do I write the JMP command in a program?
Thanks again Dieter for your time.
This make even more sense Cheers Roger |
|||
12-11-2014, 09:37 PM
Post: #6
|
|||
|
|||
RE: How do I write the JMP command in a program?
(12-11-2014 01:21 PM)Dieter Wrote: JMP is a shorcut generated by the 34s assembler. The actual program uses SKIP (forward jump) or BACK (backward jump) instead, stating the number of skipped lines. It is a bit more sophisticated than this. JMP will also insert a label and use a GTO instruction if the branch range is too far for BACK and SKIP. - Pauli |
|||
12-12-2014, 01:11 PM
(This post was last modified: 12-12-2014 01:13 PM by walter b.)
Post: #7
|
|||
|
|||
RE: How do I write the JMP command in a program?
(12-11-2014 09:37 PM)Paul Dale Wrote:(12-11-2014 01:21 PM)Dieter Wrote: JMP is a shorcut generated by the 34s assembler. The actual program uses SKIP (forward jump) or BACK (backward jump) instead, stating the number of skipped lines. JMP is not generated by the assembler but is a pseudo-command the assembler translates. Please see pp. 189f of the downloadable manual v3.1, pp. 212f of the printed manual v3.2, or pp. 323ff of the printed manual v3.3 in this matter. d:-) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)