TITLE ADDSUB
; this program adds and substract integers
.386
.MODEL flat, stdcall
.STACK 4096
ExitProcess PROTO, dwExitCode: DWORD
DumpRegs PROTO
.code
main PROC
mov eax, 10000h
add eax, 40000h
sub eax, 20000h
call DumpRegs
INVOKE ExitProcess, 0
main ENDP
END main
Assembling: C:\Projectos\pru.asm
MASM : fatal error A1000: cannot open file : C:\Projectos\pru.asm
El volumen de la unidad C es Programas
El n£mero de serie del volumen es: 249C-05D7
Directorio de C:\Projectos
28/05/2010 10:23 309 pru
1 archivos 309 bytes
0 dirs 3.452.473.344 bytes libres
Estoy ensamblando en una máquina virtual, será ese el problema?
One of the following may be a cause:
The file does not exist. El archivo existe
The file is in use by another process. No está siendo usado por otro
The filename is not valid. No se ha que se refiere, creo que no tiene nada extraño el filename
A read-only file with the output filename already exists.La carpeta está vacía, solo con el pru.asm
The current drive is full. Quedan 3gb
The current directory is the root and is full. Root? No podré compilar en C?
The device cannot be written to. Si se puede escribir
The drive is not ready. Creo que si lo está
EI: juntando mensajes.Al parecer era un problema de MASM... Me he pasado a Rad ASM, y por lo menos ensambla bien. Ahora, quiero linkearlo pero aparecen errores que seguramente son de librerías:
plus.obj : error LNK2001: unresolved external symbol _ExitProcess@4
plus.obj : error LNK2001: unresolved external symbol _DumpRegs@0
Sigue siendo el mismo source anterior.
EDITADO:
Se solucionó el tema de ExitProcess, pero aún falta dumpregs.