sshahir
November 22nd, 2007, 12:29 AM
Hi all,
I have developed the following simple assembly program for x86 and called it "Assem_Test1.s":
.MODEL SMALL
.CODE
MOV AH,2
MOV DL,5A
INT 21
INT 20
I have tried the following there commands to generate the .obj file using C compiler as the X86 assembler:
gcc Assem_Test1.s
gcc -assembler Assem_Test1.s
g++ -assembler-with-cpp Assem_Test1.s m_Test1.s
however, I haven't been able to generate the .obj file; instead, the following error messages are thrown:
Assem_Test1.s:1: Error: unknown pseudo-op: `.model'
Assem_Test1.s:2: Error: unknown pseudo-op: `.code'
Assem_Test1.s:4: Error: too many memory references for `mov'
Assem_Test1.s:5: Error: too many memory references for `mov'
Assem_Test1.s:6: Error: suffix or operands invalid for `int'
Assem_Test1.s:7: Error: suffix or operands invalid for `int'
a
I am wondering how I can use the C compiler (either gcc or g++) to generate .obj files. Please let me know if you have any comments or suggestions.
Regards,
sshahir
I have developed the following simple assembly program for x86 and called it "Assem_Test1.s":
.MODEL SMALL
.CODE
MOV AH,2
MOV DL,5A
INT 21
INT 20
I have tried the following there commands to generate the .obj file using C compiler as the X86 assembler:
gcc Assem_Test1.s
gcc -assembler Assem_Test1.s
g++ -assembler-with-cpp Assem_Test1.s m_Test1.s
however, I haven't been able to generate the .obj file; instead, the following error messages are thrown:
Assem_Test1.s:1: Error: unknown pseudo-op: `.model'
Assem_Test1.s:2: Error: unknown pseudo-op: `.code'
Assem_Test1.s:4: Error: too many memory references for `mov'
Assem_Test1.s:5: Error: too many memory references for `mov'
Assem_Test1.s:6: Error: suffix or operands invalid for `int'
Assem_Test1.s:7: Error: suffix or operands invalid for `int'
a
I am wondering how I can use the C compiler (either gcc or g++) to generate .obj files. Please let me know if you have any comments or suggestions.
Regards,
sshahir