flat assembler
Message board for the users of flat assembler.
Index
> DOS > TASM -> FASM again |
Author |
|
beppe85 14 Jan 2005, 16:22
Haven't used TASM too much, but the last I know. In FASM you put
Code: times 20 db ' ' OK, I found this on net http://www.clipx.net/ng/masm/ng53eb2.php. LABEL seems to be a stripped-down version of virtual. See if this work: Code: MAX_LEN DB 20 ACT_LEN DB ? BN_DATA: times 20 DB ' ' virtual at MAX_LEN PARA_LIST rb 22 end virtual |
|||
14 Jan 2005, 16:22 |
|
dieboy 14 Jan 2005, 16:36
Hm..... I write one more time . I'm going to write program like "hello ..." in FASM, and I want to get text from keyboard (?), and in TASM I'm write (something like psacal's readln() ):
Code: PARA_LIST LABEL BYTE. MAX_LEN DB 20 ACT_LEN DB ? BN_DATA DB 20 DUP(' ') mov ah, 0ah lea dx, PARA_LIST int 21h ... And question: How write this in FASM ? _________________ ... |
|||
14 Jan 2005, 16:36 |
|
beppe85 14 Jan 2005, 16:49
In FASM, names refers to theirs addresses, not its contents like others assemblers.
So, lea dx, PARA_LIST in TASM could be done in FASM: Code: lea dx, [PARA_LIST] ; this way mov dx, PARA_LIST ; or this way |
|||
14 Jan 2005, 16:49 |
|
dieboy 14 Jan 2005, 17:04
beppe85 wrote: In FASM, names refers to theirs addresses, not its contents like others assemblers. Yeah, this I know Maybe you can write me simple code ? _________________ ... |
|||
14 Jan 2005, 17:04 |
|
beppe85 14 Jan 2005, 17:17
Sorry, programming in DOS is desesperating.
But for the snippet you posted, is just follow what I told you. |
|||
14 Jan 2005, 17:17 |
|
vid 17 Jan 2005, 17:47
i'm not sure what you want, but your code would be
Code: PARA_LIST label byte MAX_LEN DB 20 ACT_LEN DB ? BN_DATA label byte times 20 DB ' ' mov ah, 0ah lea dx, [PARA_LIST] int 21h |
|||
17 Jan 2005, 17:47 |
|
Bitdog 24 Jan 2005, 17:13
PARA_LIST label byte
above is just a label/address, PARA_LIST: is what I use in Fasm for the same thing. MAX_LEN DB 20 ;this is the same as Fasm ACT_LEN DB ? ;this is a reserved byte ACT_LEN: RB 1 might be the fasm equilivant, but you could just declair a byte ACT_LEN DB 0 BN_DATA label byte ; another simple label for the assembler to use times 20 DB ' ' ;this is Fasm BN_DATA DB "XXXXXXXXXXXXXXXXXXXX" ; replace the X with a space is what I use in Fasm for short declaired arrays. They are easy to make & view. mov ah, 0ah ;this is Fasm lea dx, [PARA_LIST] ; this is just a move address into DX instruction MOV DX,PARA_LIST ; this is a simple address move also int 21h ;this is Fasm Simple is always best (for me anyways) KISS = Keep It Simple Stupid is my motto. |
|||
24 Jan 2005, 17:13 |
|
Matrix 25 Jun 2005, 05:04
Hy,
newbies, pls read the FASM documentation and the faqs:
|
|||
25 Jun 2005, 05:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.