flat assembler
Message board for the users of flat assembler.

Index > DOS > lea wrong syntax [solved]

Author
Thread Post new topic Reply to topic
percy_vere_uk



Joined: 11 Apr 2011
Posts: 8
Location: Dorset Uk
percy_vere_uk 11 Apr 2011, 12:52
Hi

I am a new member and have started to play around with dos again after going astray for many years. In the past I have used A86 and now would like to use fasm.
The source snippet below works fine in A86 and lea points to ds:0102 which is where the start of image resides. But in fasm lea points to ds:0066 which is wrong. It looks as though I am using the wrong syntax. Help please and what is the best learning tool for fasm syntax.

percy


;-------------------------------------------------------------------------
org 0100 ;100h bytes for psp

jmp start
;
image: db 1,2,3,4,5
;..............................................................

start:
;
lea si,[image]
;
;......exit.................................................................
int 20h
;----------------------------------------------------------------------------------------------------------------------


Last edited by percy_vere_uk on 11 Apr 2011, 13:10; edited 1 time in total
Post 11 Apr 2011, 12:52
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 11 Apr 2011, 13:01
You supplied 100 decimal as argument of "org", should be hex Wink
Post 11 Apr 2011, 13:01
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
percy_vere_uk



Joined: 11 Apr 2011
Posts: 8
Location: Dorset Uk
percy_vere_uk 11 Apr 2011, 13:09
vid

Yes that was the problem thank you. The following 'h' was not needed with A86 so I will have to watch that.

percy
Post 11 Apr 2011, 13:09
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.