mikeakohn / naken_asm

Assembler for MSP430, dsPIC, ARM, MIPS, 65xx, 68000, 8051/8052, Atmel AVR8, and others.
http://www.mikekohn.net/micro/naken_asm.php
GNU General Public License v3.0
290 stars 49 forks source link

Simulator 'write32' command only writes 16-bit values with decimal numbers #107

Closed dlkeng closed 2 years ago

dlkeng commented 2 years ago

Using the naken_util simulator's "write32" command, when trying to write 32-bit decimal numbers, it actually only writes 16-bit numbers to the 32-bit memory space.

STM8 Simulator Example: write32 0 -1 1234567890 reports writing 2 int32's starting at address 0, but a "print32 0" shows: 0x0000: 0000ffff 000002d2 . . .

This appears to be a problem with the "get_num( )" function. This problem occurs with both positive and negative decimal numbers. Hexadecimal numbers are OK

mikeakohn commented 2 years ago

I think there is a better fix for it, but for now this should take care of it. Thanks for letting me know :).