Hydrogen Assembler 0.2.x
- AaronMiller
- Member
- Posts: 81
- Joined: Thu Mar 06, 2008 1:26 pm
- Location: Roseville, California (USA)
- Contact:
Re: Hydrogen Assembler 0.2.x
That looks cool. Looks like it'll be quite useful. If you want any help with the assembler or your language (or w/e) let me know.
EDIT: Is it case sensitive?
Cheers,
-naota
EDIT: Is it case sensitive?
Cheers,
-naota
Re: Hydrogen Assembler 0.2.x
I do not need help for now, thanks! I just need some testers...
Instructions are case insensitive, and symbols are case sensitive (like HyASM).AaronMiller wrote: EDIT: Is it case sensitive?
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
- AaronMiller
- Member
- Posts: 81
- Joined: Thu Mar 06, 2008 1:26 pm
- Location: Roseville, California (USA)
- Contact:
Re: Hydrogen Assembler 0.2.x
Okay, cool. Good luck!
Cheers,
-naota
Cheers,
-naota
Re: Hydrogen Assembler 0.2.x
New release: 0.2.5.
What's new?
- fixed a critical bug with DB and strings.
- MIPS: added new instructions.
- added specific variables:
OFFSET: get the offset in the current section.
BASEADDR: get the base address of the application.
SECTADDR: get the base address of the current section.
SECTSIZE: get the size of the current section.
What's new?
- fixed a critical bug with DB and strings.
- MIPS: added new instructions.
- added specific variables:
OFFSET: get the offset in the current section.
BASEADDR: get the base address of the application.
SECTADDR: get the base address of the current section.
SECTSIZE: get the size of the current section.
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: Hydrogen Assembler 0.2.x
Hi Tommy,
In the console example I tried to automatically calculate the length of the string:This caused the following error:Is this something still to be implemented?
Nice start with the manual. I think it's complete enough for people already familiar with assembly language. I'm not sure if I understand the RELATIVE operator though, and should OFFSET really be relative to some section?
In the console example I tried to automatically calculate the length of the string:
Code: Select all
Hello: db "Hello, world!", 13, 10
Length equ $ - Hello
Code: Select all
Error: console.asm(55): invalid instruction or directive ("Hello").
Nice start with the manual. I think it's complete enough for people already familiar with assembly language. I'm not sure if I understand the RELATIVE operator though, and should OFFSET really be relative to some section?
Re: Hydrogen Assembler 0.2.x
Hi Hobbes,
like "ADDRESS" or something like that. I think I will made a new release today. Other thing, expressions must be
placed between parentheses.
of the application. The manual will be updated, RELATIVE is not a variable. OFFSET contains the current offset in the
section. To be clear: OFFSET = $ - SECTADDR.
Tommy
HyASM doesn't support yet the '$' operator. I don't like the "name" : $. I should find a name more understandable,Hobbes wrote: In the console example I tried to automatically calculate the length of the string:This caused the following error:Code: Select all
Hello: db "Hello, world!", 13, 10 Length equ $ - Hello
Is this something still to be implemented?Code: Select all
Error: console.asm(55): invalid instruction or directive ("Hello").
like "ADDRESS" or something like that. I think I will made a new release today. Other thing, expressions must be
placed between parentheses.
The RELATIVE operator is equivalent to the RVA operator in FASM. It get the relative address of a symbol to the base addressHobbes wrote: Nice start with the manual. I think it's complete enough for people already familiar with assembly language. I'm not sure if I understand the RELATIVE operator though, and should OFFSET really be relative to some section?
of the application. The manual will be updated, RELATIVE is not a variable. OFFSET contains the current offset in the
section. To be clear: OFFSET = $ - SECTADDR.
Tommy
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: Hydrogen Assembler 0.2.x
This differs a lot from the OFFSET operator in MASM and TASM syntax, doesn't it? I mean, the next two are equivalent in MASM but not in HyASM:Tommy wrote:OFFSET contains the current offset in the section. To be clear: OFFSET = $ - SECTADDR.
Code: Select all
push dword Hello
push offset Hello
Re: Hydrogen Assembler 0.2.x
In MASM/TASM, the OFFSET operator is used to get the address of a symbol. This is very different.Hobbes wrote: This differs a lot from the OFFSET operator in MASM and TASM syntax, doesn't it? I mean, the next two are equivalent in MASM but not in HyASM:(Not that MASM accepts "dword <symbol>" but you get the idea.)Code: Select all
push dword Hello push offset Hello
I forgot to implement something in HyASM: the EQU operator doesn't support expressions.
Will be fixed today.
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: Hydrogen Assembler 0.2.x
New release: 0.2.6.
What's new?
- fixed a critical bug in expressions.
- EQU directive can handle expressions.
- added new assembler variable (ADDRESS).
- added new expressions operators:
& : bitwise AND
| : bitwise OR
^ : bitwise XOR
<< : bit shift left
>> : bit shift right
< : rotate left
> : rotate right
What's new?
- fixed a critical bug in expressions.
- EQU directive can handle expressions.
- added new assembler variable (ADDRESS).
- added new expressions operators:
& : bitwise AND
| : bitwise OR
^ : bitwise XOR
<< : bit shift left
>> : bit shift right
< : rotate left
> : rotate right
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: Hydrogen Assembler 0.2.x
Perhaps I will merge this project to HyASM to provide a new high-level assembler syntax...Tommy wrote: Perhaps I will begin my other project of a new programming language...
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: Hydrogen Assembler 0.2.x
Then I think you shouldn't call it OFFSET. It's confusing. How about INSECT?Tommy wrote:In MASM/TASM, the OFFSET operator is used to get the address of a symbol. This is very different.
Re: Hydrogen Assembler 0.2.x
INSECT?Hobbes wrote:Then I think you shouldn't call it OFFSET. It's confusing. How about INSECT?Tommy wrote:In MASM/TASM, the OFFSET operator is used to get the address of a symbol. This is very different.
About the MASM's OFFSET, it's confusing, yes, but I will not change. OFFSET means the current offset in section.
And in HyASM, OFFSET is not an operator. Or, I add one character before each variable to avoid confusion.
How about $OFFSET, #OFFSET... ?
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
- AaronMiller
- Member
- Posts: 81
- Joined: Thu Mar 06, 2008 1:26 pm
- Location: Roseville, California (USA)
- Contact:
Re: Hydrogen Assembler 0.2.x
I like $OFFSET.
Re: Hydrogen Assembler 0.2.x
OK. Will be changed for version 0.3.0.AaronMiller wrote:I like $OFFSET.
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa