NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: deeband on November 30, 2012, 06:33:02 PM
-
;;; keadan Mohammad id: 303109458
;;; andrawis deeb id: 305357519
;;;
.MODEL SMALL
.STACK 100h
.DATA
Var1 dd 2
PromptStr DB 'is erfect',13,10,'$'
ans dd 2
count dd 2
.CODE
.386
Begin:
MOV AX,@DATA ; DS can be written to only through a register
MOV DS,AX ; Set DS to point to data segment
dobody1:
JMP TestNext1
dobody2:
CMP ans,32513
JA finish
MOV EAX,ans
MOV EBX,2
MUL EBX
MOV ans,EAX
DEC count
TestNext1:
CMP var1,2
JE check2
MOV EAX,count
CMP Var1,EAX
JNE dobody2
check2 :
MOV EAX,ans
MOV EBX,2
MUL EBX
INC EAX
MOV EBX,ans
MUL EBX
MOV AH,9
INT 21h
MOV ans,2
MOV count,2
DEC Var1
JMP dobody1
finish :
MOV AH,4Ch ; Set terminate option for int 21h
INT 21h ; Return to DOS (terminate program)
END Begin
it is inexpected end of file encountered error
can u help me please ??
-
This looks like Masm (Tasm/Jwasm) code. Are you trying to assemble it with Nasm? We can probably help you translate it to something Nasm will eat, if that's what you need.
Best,
Frank
-
yes it`s tasm and i want it in tasm
-
As a wild guess, try "ENDS code" before "END begin".
Best,
Frank