Message board for the users of flat assembler.
> DOS > Exe question
I've done a program which i've resized memory block using an ending segment to calcule program size and i've reserved memory for a temporal buffer. For the first step I've seen that is not sufficient defining variables with reserved memory, i need fulfill them whith zeroes (for example) to can calculate the size of the executable. For the second issue I've checked that is not a good idea to use "STACK 100h" for example, instead:
TIMES 100h DB 0
MOV SS, Stack
MOV SP, 100h-2
With this changes, the program works fine. The final executable is shorter than the same in MASM and NASM compilers.
My question is: Is there a way to do this program in another finer way?
Is it possible to reserve memory in variables?
|21 Jul 2005, 08:46||
You can set the stack up also this way:
SEGMENT _Stack DB 100h DUP 0 STACK _Stack:100h-2
|21 Jul 2005, 08:51||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.
Website powered by rwasa.