Implement opt Q for fixed-point precision, and q literals (e.g. 12.34q8) (#958)

Fixes #957

Co-authored-by: ISSOtm <[email protected]>
This commit is contained in:
Rangi
2022-09-05 00:47:32 +02:00
committed by GitHub
co-authored by ISSOtm
parent 889302a9e2
commit 98a6dffbca
20 changed files with 253 additions and 56 deletions
+5 -1
View File
@@ -3,11 +3,13 @@ SECTION "test", ROM0
opt !h, !L ; already the default, but tests parsing "!"
pusho
opt p42, h, L, Wno-div
opt p42, Q.4, h, L, Wno-div
ds 1
ld [$ff88], a
halt
println $8000_0000 / -1
def n = 3.14
println "{x:n} = {f:n}"
popo
opt H, l
@@ -16,3 +18,5 @@ popo
ld [$ff88], a
halt
println $8000_0000 / -1
def n = 3.14
println "{x:n} = {f:n}"