Author Topic: erroe  (Read 11497 times)

Offline deeband

  • Jr. Member
  • *
  • Posts: 5
erroe
« 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 ??

   


Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: erroe
« Reply #1 on: November 30, 2012, 07:15:23 PM »
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


Offline deeband

  • Jr. Member
  • *
  • Posts: 5
Re: erroe
« Reply #2 on: November 30, 2012, 07:17:25 PM »
yes it`s tasm and i want it in tasm

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: erroe
« Reply #3 on: November 30, 2012, 07:40:27 PM »
As a wild guess, try "ENDS code" before "END begin".

Best,
Frank