Hi, try the newest testing kernel:
it fixes a memory allocation problem - maybe useful for MASM, too.
In addition, int 25 should be supported, our disk tools use it
without problems. Maybe you could visit our IRC channel or ICQ me
(see contact list / mailing list info on freedos.org for details)
to discuss your current version of the failing int 25 using code.
NASM is nice because it is free - but for smaller projects, you can
use Arrowsoft ASM (freeware) to compile MASM code, too (no 386 code
or other fancy stuff supported by ASM though).
In general, NASM is less automatic. It does not "assume" and you
do not have to define segments or proc(edures). A sample .com starts just as:
org 100h ; a .com file
start: jmp install
... some newer versions auto-select near / short jumps and conditional jumps,
but normally you explicitly write "short" if you want short jumps and "near"
for near conditional jumps. The default is near jumps and short conditional
jumps in other words.
You have to mention segment selections explicitly (no "assume"), like this:
Quite a difference compared to mov bx,cs:[thatvariable] or even
mov bx,thatvariable. If you would write "mov bx,thatvariable" in NASM,
it would mean move the OFFSET of thatvariable to bx. It will NOT move the
CONTENTS of thatvariable to bx. NASM does not automatically remember if your
variable is a byte, word or other. So if you write:
thatvariable db "Hello world"
somelabel: mov bx,[cs:thatvariable]
then "He" will be in bx, and NASM will not complain about your decision.
As far as I remember, NASM has no "db ?", so you use "db 0" for that, and
"mov bx,'he'" means "mov bx,'eh'" and the other way round when you compare
NASM and MASM semantics.
There is no CPU selection in (at least older versions of) NASM, so if you do
cmp dword ptr [fs:foo+ebx*4],123456
jb near bar
... then nothing will warn you that this code only runs on 386/newer CPUs.
Some other goodies:
buf: times 64 dd 0
buf2: times 42 db 42
Or try a macro with 0 arguments:
%imacro FLAGCHECK 0
pushf ; save
push ax ; test value
popf ; try to set flags
pushf ; check what happened
pop ax ; test results
popf ; restore
If you had a macro with arguments, you would use %1, %2, ... to refer to them.
You also have %include "filename" and %define name value, of course.
You get the idea :-). Hm, shouldn't this discussion be lead on freedos-devel
instead? Trying to promote NASM, of course X-).
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
Freedos-user mailing list