flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
LocoDelAssembly 15 Aug 2006, 19:52
To solve the problem with the macros do this:
Code: macro PrintString { local print, start, exit . . . } But since this is a macro it must be defined before any use of it. And for proc check the FASM examples, you have proc32.inc, there is no 16 bit version but you can try with this (without warranties) http://board.flatassembler.net/topic.php?p=40011#40011 Regards Last edited by LocoDelAssembly on 15 Aug 2006, 19:56; edited 1 time in total |
|||
![]() |
|
UCM 15 Aug 2006, 19:54
You probably don't want to use a macro. Just use this instead:
Code: format MZ org 100h include 'functions.inc' jmp main msg db 'Hello World!', 13, 10, 0 main: lea si, [msg] call PrintString lea si, [msg] call PrintString Code: PrintString: .print: mov ah,0Eh .start: lodsb cmp al,0 jz .exit int 10h jmp .start .exit: This is equivalent to using "proc". If you really want to use a macro, then you will have to use "local" to "localize" the variables print,start and exit. BTW: Enclose your code in [code] tags, since it allows scrolling and syntax highlighting. |
|||
![]() |
|
fafastrungen 15 Aug 2006, 20:11
Thanks for the answers.
I'm not using any Os behind, I have my own boot diskette who provides me the option to run a file, this is just for test. The thing is that I wanted to use something like proc in masm, but if it doesn't exists I have to be satisfied with the UCM's option. PS: Sorry for the untags code. |
|||
![]() |
|
LocoDelAssembly 15 Aug 2006, 20:24
Or test proc16.inc, it provides stack frame variables which can be useful for you. However, if you want full control of what is get assembled then use UCM's option.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.