1

I Have a Problem With my Assembly Program and i have a unknown error for myself ! after i wrote this code :

codesg segment para 'code'
    assume cs:codesg, ds:codesg, ss:codesg
    org 100h
    Begin : jmp main
    Text1 db ' ali ahmadi ' , '$'
    Text2 db 10?
    main proc
        lea si,text1
        lea di,text2
        cld
        mov cx,11
        rep movsb
        mov ah,09h
        lea dx,text2
        int 21h
        ret
        main endp
    codesg ends
end Begin

I Have an error Which tells me that : " cannot evaluate this expression 10? " Where is my problem ?

Rastin Radvar
  • 143
  • 1
  • 1
  • 8

1 Answers1

1
Text2 db 10?

The assembler can't accept 10? because it's neither a valid number nor a valid text.
Text2 is suppossed to be a buffer large enough to receive the string from Text1. Just write:

Text2  db  13 dup (?)
Sep Roland
  • 33,889
  • 7
  • 43
  • 76