Make CLI and OPT options -p and -Q more consistent (#1834)

This commit is contained in:
Rangi
2025-09-20 13:54:28 -04:00
committed by GitHub
parent d8aff148bb
commit c49a7d1e2f
6 changed files with 48 additions and 60 deletions

View File

@@ -20,15 +20,15 @@ error: Repeated digit for graphics constant 'y'
at invalid-opt.asm(10)
error: Invalid argument for option 'p'
at invalid-opt.asm(11)
error: Invalid argument for option 'p'
error: Argument for option 'p' must be between 0 and 0xFF
at invalid-opt.asm(12)
error: Invalid argument for option 'Q'
at invalid-opt.asm(13)
error: Invalid argument for option 'Q'
error: Argument for option 'Q' must be between 1 and 31
at invalid-opt.asm(14)
error: Argument for option 'Q' must be between 1 and 31
at invalid-opt.asm(15)
error: Argument for option 'r' is out of range ("99999999999999999999999999")
error: Argument for option 'r' is out of range
at invalid-opt.asm(16)
error: Must specify an argument for option 'W'
at invalid-opt.asm(17)

View File

@@ -1,6 +1,6 @@
error: Missing argument for option 'r'
error: Invalid argument for option 'r'
at opt-r.asm(5)
error: Invalid argument for option 'r' ("2a")
error: Invalid argument for option 'r'
at opt-r.asm(6)
FATAL: Recursion limit (0) exceeded
at opt-r.asm(13)

View File

@@ -1,7 +1,8 @@
SECTION "test", ROM0
pusho
opt p42, -Q.4, Wno-div
opt p66, -Q.4, Wno-div
opt -p 0x42, Q .0x04, -W no-div ; idempotent
ds 1
println $8000_0000 / -1
def n = 3.14
@@ -13,6 +14,6 @@ popo
def n = 3.14
println "{x:n} = {f:n}"
pusho -p99
pusho -p153
ds 1
popo

View File

@@ -1,2 +1,2 @@
warning: Division of -2147483648 by -1 yields -2147483648 [-Wdiv]
at opt.asm(12)
at opt.asm(13)