Author Topic: assembler directives  (Read 3621 times)

0 Members and 1 Guest are viewing this topic.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
assembler directives
« on: April 08, 2011, 03:46:12 am »
As some might know I'm currently working on an SH3 assembler designed primarily around the Prizm. I do need to make sure that I have included all common assembler directives that you use whether it is in computer or calc coding. Here is a list of what I currently have.

Code: (directives) [Select]
#include
#define
.org
data.b
data.w
data.l
align.2
align.4
What I think I'm missing is some of the conditional pre-compiler directives which I will need to add. The other I'm looking for is the symbol used to indicate a new line. I know in C/C++ it is the ; but that is the comment in asm.   Also anything else I'm missing would be good to know.  
« Last Edit: April 08, 2011, 10:36:01 am by z80man »

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Ashbad

  • Guest
Re: assembler directives
« Reply #1 on: April 08, 2011, 06:26:48 am »
.org. Is good to use too, same with .reallocate

And there are others, but most people don't use them much, and still they're mostly used for z80 assembly development.

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: assembler directives
« Reply #2 on: April 08, 2011, 07:32:48 am »
; actually isn't a new-line character.  And there are two new line characters, one is 1 byte, one is two.  One is a line-break and feed I believe, the other is just a line break.

The 1 byte one is 0x0A, the 2 byte one is 0x0D0A

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: assembler directives
« Reply #3 on: April 08, 2011, 10:35:42 am »
.org. Is good to use too, same with .reallocate

And there are others, but most people don't use them much, and still they're mostly used for z80 assembly development.
Ashbad, I can't find the meaning of .reallocate anywhere. What does that do? And the .org was my bad there. But actually unlike on the z80, most people will not use .org because most SH3 code is location independent and I've also been pushing for shell-cross compatibility for all prizm programs.
; actually isn't a new-line character.  And there are two new line characters, one is 1 byte, one is two.  One is a line-break and feed I believe, the other is just a line break.

The 1 byte one is 0x0A, the 2 byte one is 0x0D0A
I was just mentioning how in C/C++ you can start a new line using a ; but that is already reserved in asm for indicating a comment. What I'm looking for is the character allowing you to use multiple commands in one line.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: assembler directives
« Reply #4 on: April 08, 2011, 03:19:42 pm »
.org. Is good to use too, same with .reallocate

And there are others, but most people don't use them much, and still they're mostly used for z80 assembly development.
Ashbad, I can't find the meaning of .reallocate anywhere. What does that do? And the .org was my bad there. But actually unlike on the z80, most people will not use .org because most SH3 code is location independent and I've also been pushing for shell-cross compatibility for all prizm programs.
; actually isn't a new-line character.  And there are two new line characters, one is 1 byte, one is two.  One is a line-break and feed I believe, the other is just a line break.

The 1 byte one is 0x0A, the 2 byte one is 0x0D0A
I was just mentioning how in C/C++ you can start a new line using a ; but that is already reserved in asm for indicating a comment. What I'm looking for is the character allowing you to use multiple commands in one line.
Oh, probably \.  That's what it usually is, IIRC.

Ashbad

  • Guest
Re: assembler directives
« Reply #5 on: April 08, 2011, 03:37:01 pm »
.org. Is good to use too, same with .reallocate

And there are others, but most people don't use them much, and still they're mostly used for z80 assembly development.
Ashbad, I can't find the meaning of .reallocate anywhere. What does that do? And the .org was my bad there. But actually unlike on the z80, most people will not use .org because most SH3 code is location independent and I've also been pushing for shell-cross compatibility for all prizm programs.

well, reallocate can be used to change the location of where the address labels and such are being offsetted form, like .org -- but you can use it at any time, whereas with many assemblers, .org doesn't function that way.