mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2024-09-28 11:54:48 +00:00
Fix a bug in memset.
If the upper byte of the int argument was nonzero, it could write the wrong value (the OR of the upper and lower bytes). It should convert the value to unsigned char, i.e. just use the lower byte.
This commit is contained in:
parent
9e727697d3
commit
79201198a1
10
string.asm
10
string.asm
@ -482,21 +482,19 @@ rtl equ 1 return address
|
||||
|
||||
ph4 p save the pointer
|
||||
|
||||
short M
|
||||
lda val form a 2 byte value
|
||||
xba
|
||||
ora val
|
||||
sta val
|
||||
sta val+1
|
||||
|
||||
lda len if there are an odd # of bytes then
|
||||
lsr A
|
||||
bcc lb1
|
||||
short M set 1 byte now
|
||||
lda val
|
||||
lda val set 1 byte now
|
||||
sta [p]
|
||||
long M
|
||||
dec len
|
||||
inc4 p
|
||||
lb1 anop endif
|
||||
lb1 long M endif
|
||||
|
||||
lda val set len bytes
|
||||
ldx len+2 set full banks
|
||||
|
Loading…
Reference in New Issue
Block a user