[A83] Re: Manual assembly [83 83+] (was Scrolling and stuff)
[Prev][Next][Index][Thread]
[A83] Re: Manual assembly [83 83+] (was Scrolling and stuff)
Well, it is certainly not impossible to do, considering the first
programmers had to do it :-) ...
However, it is *very* hard to do, so do not expect to get much results
from it, unless you have get a lot of practice.
I'll be explaining this with the 83+ as a reference, since it is a bit
easier on that (Calcsys is wonderfull)
Th first thing you need is a table with hex codes, (BCALL is EF h) you
can find it in the asmguru reference section. You'll also need to get an
ascii table with hex codes, and a lot of paper, preferably with
horizontal AND vertical lines, evenly spaced (0.5cm / 1.0cm or 0.2"/0.4").
It is an advantage to have some hex-calculation program on the calc, and
to have Calcsys when you do 83+ programming.
Now to start, and I'll just give the way I like best, take your squared
paper, and begin by writing 9D95 in the upper left corner (9327 if you
do 83 programming).
now write your first line of assembly code at the right after that (but
keep a reasonable amount of space between it) write the rest of your
code right under the first line, (one statement per line) and keep the
space on the left size for address counting.
For .db [text] statements, be sure to put one or two blank lines under
them, and use one square per char.
Also, be sure to use labels just like you woult use them in tasm,(not
the style, just whenever you like) (but keep them in line iwht all your
opcodes.
Next, check out your code for any bugs/errors, they're not easily
corrected the way you're programming. Write everything out again if you
need to (keeping white lines often can be an advantage...)
Now, we're going to assemble it, take your opcode table, and write the
hex code right after your code. Remember to switch bytes when using 16
bit addresses! If you come at a call/jp/jr/djnz/ld to one of your own
labels, leave places for the address!
Now write the amount of bytes the opcode uses right after it (count the
addresses of your labels in!!)
Now take your ascii table, and "parse" your .db [text] statements just
like the opcodes,
but use the white line under it. to put the hex codes right under each
char. (DON'T forget to put a 0 after each string)
Write the amount of bytes taken by the text right after that.
Not put a zer0 length after all of your labels (or don't if you don't
want to)
now go counting your addresses, begin at the top, right under your
starting address, and go down. Each new address is the previous address
+ length of the previous statement.
After you finished, write the addresses that are in front of your labels
at the places where you refer to those labels, (you;ve left the places
open, right!!
Again, remember to switch the high and low byte!! (low byte first)!!
Now, for relative jumps, better not use them in jumps > 10..20 bytes.
Subtract the address of the NEXT statement after the jr statement, from
the address of the label you jump to, and fill it in.
You should have everything ready now, so open a file on the calc, and
(if 83+ then put "AsmPrgm [enter]" first) fill in all of the hex
equivalents for the opcodes, nothing more, nothing less.
(if 83 than put "[enter] End [enter] 0000 [enter] End" (or was it
0000\nEnd\n0000))
Close the program.
If you use an 83 , then type Send(9prgmYOURPROG, cross your fingers, and
press enter!
If you use an 83+, type AsmComp(prgmYOURPROG,prgmBINPROG)
now run calcsys, press 6 - 1 - 1. Now press 6 while you don't see your
program listed.
When you see your (binary!!!) program listed, press its corresponding
key. Now press [alpha] - D and watch the result, check it against your
opcodes, and if you see a fault, debug!
If it's all correct, run it!
Hope this it a long enough explanation, and good luck with it!
--Peter Martijn Kuipers
Jeff Ruud wrote:
> I have a question about scrolling...
> When you scroll the background and you also have a character on the screen, would you erase the character, scroll the screen, then redraw the character? That seems like the most logical way, but I just wanted to know if there was a different way.
>
> Also...
> I want to start programming assembly on my calculator, instead of my computer. Can someone please explain a little of how i could do this?
>
> Thx
>
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
>
>
>
Follow-Ups:
References: