augustinetez
Active Member
This is more me being OCD rather than something not working (for a change ).
I found the following macro in Ron Kreymborgs 32-bit Binary to BCD to ASCII routines which will be quite useful in something I'm playing with at the moment.
It works fine, but gives the '(202) Argument out of range. Least significant bits used' warning at the points marked in the listing.
Anyone see a way of curing that?
I found the following macro in Ron Kreymborgs 32-bit Binary to BCD to ASCII routines which will be quite useful in something I'm playing with at the moment.
It works fine, but gives the '(202) Argument out of range. Least significant bits used' warning at the points marked in the listing.
Anyone see a way of curing that?
Code:
number equ 123456789
load32 macro arg1,arg2
movlw arg1 >> 24
movwf arg2
movlw arg1 >> 16 ; Warning (202) Argument out of range. Least significant bits used.
movwf arg2+1
movlw arg1 >> 8 ; Warning (202) Argument out of range. Least significant bits used.
movwf arg2+2
movlw arg1 ; Warning (202) Argument out of range. Least significant bits used.
movwf arg2+3
endm
CBLOCK 0x0c
bin:4 ; 32-bit binary number (unsigned)
bcd:10 ; 10 BC digits or 10 ascii chars
pti,pto ; pointers
ii
temp
cnt
ENDC
load32 number,bin ; load test value (number)