From b274f894c0d18a722b04f942bb403d39aa2e41da Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 7 Jul 2024 02:43:45 -0400 Subject: bas.c: commentary for allow_hex_const (before I forget what it does). --- bas.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bas.c b/bas.c index 595ed97..4bad870 100644 --- a/bas.c +++ b/bas.c @@ -10,8 +10,18 @@ #include "bas.h" +/* caller's parse_args() should set this for the -v option */ int verbose = 0; + +/* hex constants work the same way in Turbo BASIC and BASIC XL/XE: they're + exactly like numeric constants, 6-byte BCD FP, but introduced with + OP_HEXCONST instead of OP_NUMCONST. + If allow_hex_const is set, on_exp_token will be called for OP_HEXCONST. + Otherwise, a warning will be printed, on_exp_token will NOT be called, + but the constant is skipped the same as a regular numeric, to keep + in sync with the token stream. */ int allow_hex_const = 0; + unsigned short lomem; unsigned short vntp; unsigned short vntd; -- cgit v1.2.3