text SEGMENT ORG 100h begin: a dw 23h, 0AEh, 0EAh c1 dw 2Bh c2 dw 5Dh MOV ax,a+4 ADD ax,a SUB ax,a+2 MOV bx,a+2 ADD bx,a MOV cx,c2 SUB cx,c1 MOV cl,5 MOV dx,a ROR dx,cl XOR dx,a+2 NOT dx RET text ENDS END begin - If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky ♦
|
1 answer
The data segment is not defined, you need a string that will transfer the constants to the ds data segment, and you also need to define the code area, the cs segment, this is done
assume cs:code,ds:text
The working code of your program
ORG 100h data segment a dw 23h, 0AEh, 0EAh c1 dw 2Bh c2 dw 5Dh data ends code segment assume cs:code,ds:text begin: mov ax,a+4 add ax,a sub ax,a+2 mov bx,a+2 add bx,a mov cx,c2 sub cx,c1 mov cl,5 mov dx,a ror dx,cl xor dx,a+2 not dx ret end begin |