flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
zhak
what about naturally aligned data types?
dbx sounds good. but what about RB? to reserve data? do you plan to add it? rbx woudn't work then |
|||
![]() |
|
Tomasz Grysztar
zhak wrote: what about naturally aligned data types? zhak wrote: dbx sounds good. but what about RB? to reserve data? do you plan to add it? rbx woudn't work then Code: struc rbx? unit*,count* label . : unit rb (unit) * (count) end struc |
|||
![]() |
|
Tomasz Grysztar
I uploaded the fasmg package that has it implemented under the name DBX. I can still change the name (or add a synonym) later.
|
|||
![]() |
|
revolution
DV - Define Variable sized value(s)
|
|||
![]() |
|
Tomasz Grysztar
revolution wrote: DV - Define Variable sized value(s) |
|||
![]() |
|
revolution
Tomasz Grysztar wrote:
DX - Define random sized value(s) |
|||
![]() |
|
revolution
DS - Define Specified size value(s)
|
|||
![]() |
|
revolution
DA - Define arbitrary size value(s)
|
|||
![]() |
|
revolution
Actually if/when this is implemented then perhaps all other data directives should be eliminated. Since this would be the core definition that others can be derived from.
|
|||
![]() |
|
revolution
D - Data
DATA - Data |
|||
![]() |
|
revolution
Some more suggestions from one of my colleagues:
EMIT OUTPUT OUT PUT I'll try to stop spamming this topic now, sorry. |
|||
![]() |
|
jmg
Tomasz Grysztar wrote: .... that would allow specify a size of data unit. My main aversion to dbx would be that intel code is already a sea of x's... I also dislike too-terse mnemonics, so 2 letters are out... Perhaps dbvw ? - Data Byte Variable Width dbfw ? - Data Byte Field/Fixed Width What else can this do ? Currently db 1,23,"hello",00 is allowed so, what about a variant syntax using : like dbfw 1: 1,2,3 ; 00 01 02 dbfw 2: 1,2,3 ; 0000 0001 0002 The colon now also allows this dbfw 3: 1,2,3, 2:0x55 ; 000000 000001 000002 0055 and even this... dbfw 9: "StrA","StringB","22" ; right justified strings, " " packed ? dbfw -9: "StrA","StringB","22" ; left justified strings, " " packed ? |
|||
![]() |
|
Tomasz Grysztar
revolution wrote: Actually if/when this is implemented then perhaps all other data directives should be eliminated. Since this would be the core definition that others can be derived from. jmg wrote: My main aversion to dbx would be that intel code is already a sea of x's... ![]() jmg wrote: The colon now also allows this Code: macro dbfw? args& local unit unit = 1 iterate arg,args match size:value, arg unit = size dbx unit,value else dbx unit,arg end match end iterate end macro dbfw 3: 1,2,3, 2:0x55 jmg wrote: dbfw 9: "StrA","StringB","22" ; right justified strings, " " packed ? ![]() |
|||
![]() |
|
jmg
Tomasz Grysztar wrote: The main point here is that everything can be redefined, and some symbols are there by default just to make the environment a bit more friendly to a fasm user coming to fasmg. I think it is a good idea to have "expected defaults" - ie that any ASM user would anticipate, but being able to overlay/redefine, covers all the bases... |
|||
![]() |
|
bitRAKE
https://en.wikipedia.org/wiki/Word_(computer_architecture)
DWLD = data word length data, or just WLD (wild, lol) ![]() (I was thinking FASMG was a little too x86-centric when I was reading the manual. Even though this was the intent, it still feels odd.) |
|||
![]() |
|
Tomasz Grysztar
bitRAKE wrote: (I was thinking FASMG was a little too x86-centric when I was reading the manual. Even though this was the intent, it still feels odd.) |
|||
![]() |
|
jmg
Tomasz Grysztar wrote:
Yes, I am new to fasmg, but what can be done with macros is frankly amazing. I just tried the above (of course forgot I do not yet have dbx..) No surprise it gives this invert.asm [99] macro ? [1] macro dbfw [6] Error: illegal instruction. I'm guessing [99] is source line#, [1] is ? macro level ?, [6] is line# inside macro dbfw, but the following Error: illegal instruction. is rather terse, and could be clearer, & much easier to find if it also indicated the offending word ? - here, dbx Last edited by jmg on 19 Sep 2016, 20:56; edited 1 time in total |
|||
![]() |
|
JohnFound
The name is not very important here. More important is that the suggested syntax does not distinguish between the data and the data size. In order to stay readable enough, it must separate the data size from the data values.
My suggestion is to use only "D" combined with the size of the data: Code: d1 1,2,3 ; same as db 1,2,3 d4 4,5,6 ; same as dd 4,5,6 Or if the single "d" is not enough, it can be "dv" from "define variable": Code: dv1 1,2,3 ; same as db 1,2,3 dv4 4,5,6 ; same as dd 4,5,6 Another approach is to use another separator for the size, like ":" Code: dbx 1: 1,2,3 ; same as db 1,2,3 dbx 4: 4,5,6 ; same as dd 4,5,6 |
|||
![]() |
|
jmg
JohnFound wrote:
I thought of that, but that does not allow an equate to set the field width, which could be useful. JohnFound wrote:
I agree that is better, (now can be equate set) and as the macro example above hints, this Size: can also now be redefined along the line too. |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2019, Tomasz Grysztar.
Powered by rwasa.