flat assembler
Message board for the users of flat assembler.
Index
> Main > How set memery cells according to a segemt? |
Author |
|
LiuJunfeng 05 Mar 2004, 16:51
I'm new to assemly coding, how to translate this code to fasm?
Code: seg es mov [0],#0x41 |
|||
05 Mar 2004, 16:51 |
|
JohnFound 05 Mar 2004, 20:02
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 |
|||
05 Mar 2004, 20:02 |
|
vid 06 Mar 2004, 11:00
yeah, didnt know about this.
anyway, i never seen assembler for non-IBMs |
|||
06 Mar 2004, 11:00 |
|
LiuJunfeng 06 Mar 2004, 15:03
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 |
|||
06 Mar 2004, 15:03 |
|
vid 06 Mar 2004, 19:56
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 } |
|||
06 Mar 2004, 19:56 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.