flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LiuJunfeng
I'm new to assemly coding, how to translate this code to fasm?
Code: seg es mov [0],#0x41 |
|||
![]() |
|
JohnFound
vid wrote: #0x41 is nothing, i think you are moving from pascal that's why you used # am i right? In some assemblers (for example 68000 and 6502) # mean immediate constant as opposite to address. For example: Code: ; 6502 code lda somelabel ; loads accumulator with content of some address. lda #somelabel ; loads the address of the label in the accumulator. I don't know x86 assemblers to use this approach, but this means nothing - there are many assemblers out there. ![]() Regards |
|||
![]() |
|
vid
yeah, didnt know about this.
anyway, i never seen assembler for non-IBMs |
|||
![]() |
|
LiuJunfeng
Thank you!
I've known these number formats, I think "seg es" is also a good directive so that you don't have to preappend "es" for each cell index. vid wrote: mov [es:0],0x41 |
|||
![]() |
|
vid
as i know, fasm doesn't have such directive, but it can be made with macros. (too bad i'm too lazy to code it for you
![]() i was thinking about something that will allow such maro very easily privalov - end virtual restores code pointer. What if it would take argument which will tell how much of virtual data leave defined (eg how much to add to code generation pointer). Example: macro seg segname { virtual mov byte [segname:0],5 end virtual +1 ;restore 1 byte behind virtual, thus leaving seg. prefix defined } |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.