First post, by paprika
- Rank
- Newbie
Probably a long shot but maybe someone here knows.
I'm trying to cross-compile assembly code from a modern machine, using http://sun.hasenbraten.de/vasm/ compiler and http://sun.hasenbraten.de/vlink/ linker, to 8088 XT.
I am able to compile basic code (to display a string) on MS-DOS using MASM, but I'm unable to replicate that with vasm. I'm not sure the problem is in my syntax, or in how I call vasm.
This code (written, compiled, and linked in MASM) executes and correctly displays a string:
ASSUME CS :CODE, DS :DATADATA SEGMENTMESSAGE DB 0DH, 0AH, " HELLO BELLO", 0DH, 0AH, "$"DATA ENDSCODE SEGMENTSTART: MOV AX, DATAMOV DS, AXMOV AH, 09HMOV DX, OFFSET MESSAGEINT 21HMOV AH, 4CHINT 21HCODE ENDSEND START
Whereas this code also compiles and executes, but displays garbage when run under DOS:
.code16.org 0x100start:mov $0x9, %ahlea msg, %dxint $21mov $0x4c, %axint $21msg:.byte "hello bello", 0x0a
This is how I run the compiler:
vasmx86_std -m8086 -Faout mmm.asm -o mmm.obj
and this is how I run the linker:
vlink mmm.obj -o mmm.exe
Any ideas?