flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 16 Jan 2008, 05:25
my advice would be to use FASM as backend compiler, if you don't know how to do this.
|
|||
![]() |
|
viraj2005 16 Jan 2008, 05:31
Hi Vid,
thanks for the reply. I really wants to build my own assembler cos it is my final year project. Rgds, Viraj |
|||
![]() |
|
DOS386 16 Jan 2008, 10:52
.
> Recently I have started to build an OO compiler. I want to build my own assembler > really wants to build my own assembler cos it is my final year project. Isn't the OO compiler itself hard enough ? ![]() > But I dont know how to assemble jumps and procedures. 1. CPU has no procedures. "proc" in MASM is just a sub, with some odd extra stuff processed/added by the assembler (stack frame, "local" stuff, parameter counting/checking ?). 2. Jumps: you need at least 2 passes. - 1st pass place all labels into a table, compile back jumps but leave forward jumps open (assume "near") - 2nd pass fill the forward jumps from table This works but is suboptimal ... FASM does more than 2 passes and is better. And YES, you should focus on your "OO" and just use FASM. _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
System86 16 Jan 2008, 23:38
Quote:
When compiling to asm for the fasm backend, use jmp for jumps and call for procedures (as for these, you can create a stack frame using the enter/leave instructions or by modifying esp, the CPU won't do if for you). |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.