ml64 give error in this command: ASSUME CS:CODESG
error message: A2008:syntax error:CS
why does give error this command
ASSUME CS:CODESG
what is wrong?
are you sure you have the segment name correct ?
yes i am sure
codes:
PAGE 60,80
TITLE 16 BITLIK IKI SAYININ TOPLANMASI
STACKSG SEGMENT PARA 'STACK'
DW 10 DUP(?)
STACKSG ENDS
DATASG SEGMENT PARA 'DATA'
ASAYISI DW 1234H
BSAYISI DW 0ABCDH
TOPLAM DD 0H
DATASG ENDS
CODESG SEGMENT PARA 'CODE'
ASSUME CS:CODESG
ASSUME DS:DATASG
ASSUME SS:STACKSG
ANA PROC FAR
PUSH DS
SUB AX, AX
PUSH AX
MOV AX, DATASG
MOV DS, AX
LEA SI, TOPLAM
MOV AX, ASAYISI
MOV BX, BSAYISI
ADD AX, BX
MOV [SI], AX
ADC WORD PTR [SI+2], 0
RET
ANA ENDP
CODESG ENDS
END ANA
errors: 12.,13.,14.,15.,16. and 28/ lines
(http://img844.imageshack.us/img844/8817/ml64.jpg)
Segment registers were retired in LONG MODE (x64) so you can't use them. FS and GS can however be used as pointers to fixed data (in long mode the GS register points to the TIB).
I guess 32 bit and 64 bit working systems are different. how can I learn 64 bit assembly? can you tell me source?
Have a look at GoAsm or JWasm both good x64 assemblers, and both with example code available. ML64 is a bit stripped down so beginners should avoid it as even setting up a call to a procedure can be a chore in it.
making the transition from 16-bit to 64-bit without passing through 32-bit may be a bit much, also
but, if you must - JwAsm is a good place to start
welcome to the forum, by the way :U