NASM Forum > Using NASM
GoDevTool Debugger doesn't like this line of code
OpAmp:
https://imgur.com/1YWkAyo
Here's what I'm trying to do:
//Develop a sequence of instructions that converts the unsigned number in AX (values of
//0–65535) into a 5-digit BCD number stored in memory, beginning at the location addressed
//by the BX register in the data segment. Note that the most significant character is stored
//first and no attempt is made to blank leading zeros.
I'm trying to load the contents of AL into the location addressed by the BX register in the data segment, but the debugger doesn't seem to like my code:
MOV [EBX], AL;
Any thoughts?
Frank Kotler:
Hi OpAmp,
Welcome to the forum.
I'm afraid I'm confused. Your code looks like 16 bit,but the exception looks like 'doze.
What command line did you give Nasm? How are you trying to run this?
I'm not very familiar with GoDev. Maybe ask at Jeremy's site?
Best,
Frank
Structure:
--- Code: ---MOV [EBX], AL;
--- End code ---
--- Quote ---Any thoughts?
--- End quote ---
yep...
https://www.tutorialspoint.com/assembly_programming/assembly_registers.htm
also...
https://stackoverflow.com/questions/32836589/nasm-how-do-you-move-an-8-bit-register-into-a-full-32-bit-register
Frank Kotler:
Nice links, Structure, but what's your point? What are you saying OpAmp should have done?
Best,
Frank
Structure:
--- Quote ---What are you saying OpAmp should have done?
--- End quote ---
I'm no assembly expert it's just a thought...
Perhaps try: movzx ?
Navigation
[0] Message Index
[#] Next page
Go to full version