Skip to content

Commit bbfb7e9

Browse files
authored
Merge pull request #296 from boriel/bugfix/usr_str
Fix error in usr_str
2 parents 2ecdfec + cf772df commit bbfb7e9

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

library-asm/usr_str.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ USR_STR:
3131
and 11011111b ; Convert it to UPPER CASE
3232
sub 144 ; CODE(UDG "A")
3333
jr nc, CONT
34-
adc a, 144 ; It was a letter
34+
add a, 144 ; It was a letter
3535
sub 'A'
3636

3737
LOCAL CONT

tests/functional/fastcall0.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ USR_STR:
11921192
and 11011111b ; Convert it to UPPER CASE
11931193
sub 144 ; CODE(UDG "A")
11941194
jr nc, CONT
1195-
adc a, 144 ; It was a letter
1195+
add a, 144 ; It was a letter
11961196
sub 'A'
11971197
LOCAL CONT
11981198
CONT:

tests/functional/spfill.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ USR_STR:
11921192
and 11011111b ; Convert it to UPPER CASE
11931193
sub 144 ; CODE(UDG "A")
11941194
jr nc, CONT
1195-
adc a, 144 ; It was a letter
1195+
add a, 144 ; It was a letter
11961196
sub 'A'
11971197
LOCAL CONT
11981198
CONT:

tests/functional/usr0.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ USR_STR:
13981398
and 11011111b ; Convert it to UPPER CASE
13991399
sub 144 ; CODE(UDG "A")
14001400
jr nc, CONT
1401-
adc a, 144 ; It was a letter
1401+
add a, 144 ; It was a letter
14021402
sub 'A'
14031403
LOCAL CONT
14041404
CONT:

tests/runtime/usr_str.bas

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
PRINT USR "a"
3+
PRINT USR "A"
4+
PRINT USR "\a"
5+
PRINT USR "\A"
6+
7+

0 commit comments

Comments
 (0)