Hullo Jos Croeze, hope you are having a nice day!!
16-Mar-98 01:12:59, Jos Croeze wrote to Fernando Ariel Gont
Subject: Problem to make a compiler
FA>> Well, I don't know how to code the "jmp" instruction, as I don't
FA>> have the address that equals "yeah" label.
JC> Just teasing you a bit with my following comment. Have you noticed
JC> that there are several opcodes for a jmp? If a jmp is closer than
Yeah, but I don't want to make a x86 compiler... I want to make a 6809
one..
I haven't studied very much how the 6809 instructions are encoded, but I
think (and hope), that it won't be very-very hard....
JC> 7fh bytes you can use tw bytes for the opcode with the offset. If
JC> the jmp is closer than 7fffh bytes you'll need three bytes (opcode
JC> and two bytes for offset). And then there is a jmp-opcode followed
JC> by two bytes, defining the direct address.
JC> Writing .COM-files is easy when you use a direct address for every
JC> jmp. In that case you just compile(assemble) the mnemonic to
JC> opcodes, collecting the addresses op the labels.
As the program is stored in an EPROM, PROM or ROM, there are no "formats"
such as .COM...
I think the "structure" of a program is similar to that of a .COM, but, as
they are different uP's and systems, I'll have to study it...
Thanks, anyway!
-=> Yours sincerely, Fernando Ariel Gont <=-
e-mail: FGont@siscor.bibnal.edu.ar
e-mail "Good Stuff!" _*Magazine*_ : gstuff@siscor.bibnal.edu.ar
FidoNet: 4:900/470.10
Sk-Network (Argentina): Murdock's Point (200:201/300.27)
--- Terminate 5.00 UnReg(159)
---------------
* Origin: A: -NiMiNisiNDa. B: - Minister!! (Just a. n. o.) (4:900/470.10)
|