flat assembler
Message board for the users of flat assembler.

Index > Main > How to Implement DUP in FlatASM

Author
Thread Post new topic Reply to topic
avenegas



Joined: 31 Jan 2005
Posts: 4
avenegas
please help me with this code, i want to use FlatASM


Description:
Download
Filename: snake.asm
Filesize: 5.51 KB
Downloaded: 239 Time(s)

Post 31 Jan 2005, 17:01
View user's profile Send private message Reply with quote
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio
avenegas wrote:
please help me with this code, i want to use FlatASM

replace dup by: rw s_size
and also read the fasm manual.
Post 31 Jan 2005, 17:44
View user's profile Send private message Visit poster's website Reply with quote
avenegas



Joined: 31 Jan 2005
Posts: 4
avenegas
before:
snake DW s_size DUP(0)

now:
snake rw s_size

Now this line has a problem, please advice what can i do;

MOV DX, snake[0]

Note: I tried to look for some help in the HTML manual, but I think this is only a syntax problem.
Post 31 Jan 2005, 19:20
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Flatassembler uses the 'times' directive instead of DUP, see below:

Code:
snake: times s_size DW 0    

is the same as,
Code:
snake dw s_size DUP(0)    
[/b]
Post 31 Jan 2005, 19:41
View user's profile Send private message Reply with quote
avenegas



Joined: 31 Jan 2005
Posts: 4
avenegas
MOV DX, snake[0]

Please advice...
Post 31 Jan 2005, 19:58
View user's profile Send private message Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85
mov dx, [snake+0*2] ; array + offset * wordsize

avenegas wrote:
MOV DX, snake[0]

Please advice...

_________________
"I assemble, therefore I am"

If you got some spare time, visit my blog: http://www.beppe.theblog.com.br/ and sign my guestmap
Post 31 Jan 2005, 20:23
View user's profile Send private message Reply with quote
Dryobates



Joined: 13 Jul 2003
Posts: 46
Location: Poland
Dryobates
avenegas wrote:
MOV DX, snake[0]

Please advice...

mov dx, [snake + 0]

_________________
There's one more bug... Smile
Image
Post 31 Jan 2005, 20:27
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
avenegas



Joined: 31 Jan 2005
Posts: 4
avenegas
now I can compile the program with no errors

Atte:
Avenegas Very Happy
Post 31 Jan 2005, 22:01
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
you can use
Code:
dup equ times    
if you prefer to use the shorter dup
Post 02 Feb 2005, 13:26
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.