Extend left-shift operator

- Negative shift values are right-shift
- Optimize shift of 0 or more than 15
- Allow shifting symbols by complex relocation
This commit is contained in:
Stephen Casner
2021-02-15 00:10:24 -08:00
committed by Olaf Seibert
parent 93d7839ccf
commit 05fc94ce90
3 changed files with 119 additions and 89 deletions

View File

@@ -24,7 +24,8 @@ five = 5
a: .word 123 _ 3 ; 001230
.word five _ 6 ; 000500
.word 101_five ; 004040
.word a _ 3 ; Invalid expression
.word 177400 _ -8. ; 000377
.word a _ 3 ; Complex relocation
.word - 377 ; 177401
.word + 377 ; 000377