flat assembler
Message board for the users of flat assembler.
Index
> Main > Error when using PROC in flat assembler. |
What assembler do you use? | |||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||
Total Votes : 21 |
Author |
|
revolution 10 Jun 2006, 09:37
Put this at the head of your file.
Code: include 'proc32.inc' Also try 'win32ax.inc' instead to include all the other macros. |
|||
10 Jun 2006, 09:37 |
|
Tomasz Grysztar 10 Jun 2006, 11:14
It appears that here more like PROC16.INC would be needed.
|
|||
10 Jun 2006, 11:14 |
|
revolution 10 Jun 2006, 13:34
Quote: It appears that here more like PROC16.INC would be needed Try this instead: Code: PRINTOUT: label MSGPTR WORD at bp+4 push bp mov bp,sp MOV DX, [MSGPTR] MOV AH, 9 INT 0x21 leave RET Last edited by revolution on 10 Jun 2006, 14:57; edited 1 time in total |
|||
10 Jun 2006, 13:34 |
|
LocoDelAssembly 10 Jun 2006, 14:49
Hi, I ported PROC32 to PROC16, works fine with the example but I don't fully tested it. Please someone try it and tell me if it's works fine.
Regards
|
|||||||||||
10 Jun 2006, 14:49 |
|
Adam Kachwalla 11 Jun 2006, 00:00
Tomasz, I reckon this should be integrated in FASM (You did mention it was similar to TASM syntax). Also, what is the difference between PROC16 and PROC32?
|
|||
11 Jun 2006, 00:00 |
|
Adam Kachwalla 11 Jun 2006, 00:06
Locodelassembly, your PROC16 module works fine, but I still cannot get the TASM syntax advantage (I only had 1 argument in the proc, though)
|
|||
11 Jun 2006, 00:06 |
|
LocoDelAssembly 11 Jun 2006, 00:06
I just replaced EBP and ESP with BP and SP respectively and changed the representation of args with dw instead of dd and some other adjustments but it's practically the same.
Regards PS: There is a PROC16 already? I forgot to check that (but, I'm sure that it's not present in standard package) |
|||
11 Jun 2006, 00:06 |
|
LocoDelAssembly 11 Jun 2006, 00:22
Give an example of what thing you can't do with PROC16.
Ah, please note this which I realised some minutes ago Code: proc PRINTOUT MSGPTR:WORD MOV DX, [MSGPTR] MOV AH, 9 INT 0x21 ret ; <- lowercase because this way the apropiate leave/ret 2 sequence will be assembled while with RET only the RET instruction will be assembled endp Note that "proc" defines the macro "ret" which assembles the appropiate return sequence and since macros are case sensitive it's important to write ret in lowercase. Regards PS: You can also add "RET fix ret" at the beginning of the source code to solve this problem too |
|||
11 Jun 2006, 00:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.