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

Fixes #957

Co-authored-by: ISSOtm <eldredhabert0@gmail.com>
This commit is contained in:
Rangi
2022-09-04 18:47:32 -04:00
committed by GitHub
parent 889302a9e2
commit 98a6dffbca
20 changed files with 253 additions and 56 deletions

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}"