flat assembler
Message board for the users of flat assembler.
Index
> DOS > [Newbie] MZ does not support multiple code labels? |
Author |
|
revolution 02 Mar 2011, 00:14
fasm uses labels starting with a single dot as local labels and will automatically attach the name to the previous non-local label. Just rename your sections so that they don't start with a single dot:
Code: format MZ entry codeseg:main segment codeseg main: mov ax,dataseg mov ds,ax mov si,msg mov cx,msglen mov ah,0eh myLoop: mov al,[si] int 10h inc si loop myLoop mov ah,10h int 16h ret segment dataseg msg db 'Assembly Programming',0dh,0ah msglen = $-msg |
|||
02 Mar 2011, 00:14 |
|
fasmnewbie 02 Mar 2011, 10:43
revolution wrote: fasm uses labels starting with a single dot as local labels and will automatically attach the name to the previous non-local label. Just rename your sections so that they don't start with a single dot: That's one perfect answer. My code now works. I thought that was a syntax requirement. Still can't get rid of that HLL syntax 'mentality'. That is because I keep seeing the dotted segment's name in everywhere an MZ format code appears, even in the Sample. Thanks revo. |
|||
02 Mar 2011, 10:43 |
|
revolution 02 Mar 2011, 10:48
The example that comes with fasm, MULTISEG.ASM, does not have dots in the names. I wonder which example you are referring to?
|
|||
02 Mar 2011, 10:48 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.