Transfer Values greater than 65536 to variable DD error - Assembly 8086

Asked

Viewed 48 times

1

I’m having some difficulty assigning values greater than 65536 (16 bits), in my code example assign the value of 86400 (one-day value) to a variable with DD declaration (32-bit architecture) and the following error is presented when trying to compile.

inserir a descrição da imagem aqui

.data

dia dd ?
re dd ?

.code

mov dia, 86400
mov re, 65536
mov ax, re
cmp ax, dia
jg programa
sub dia, re
programa:
hlt

Does anyone know a way to perform this action?

  • The emu8086 can only emulate a 16-bit processor, so it is not possible to load a value greater than 65535 into a register (error of "overflow"). You can try compiling with fasm (in the Assembler menu), but the syntax of the program will be different and you won’t be able to run it in the emulator. Another option is to use another compiler (eg: flat Assembler or NASM).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.