01-26-2021, 12:13 PM
Hi all,
I'm trying to get my head around building some new functions and began playing with asmnut. I have a question concerning the PROMPT feature that asmnut nicely supports.
Sadly, the way PROMPT works (and doesn't work) is not as documented in DOCUMENTATION, and it is contradictory in prompt.c.
DOCUMENTATION says,
and the code in prompt.c looks like this
where the left part coincides with the documentation above, and the right hand part (after //) coincides with what Meindert Kuipers wrote here.
Anyway. The flags A, a, or 2SIY appear to work and do what they are supposed to, but all others I've tried throw an assembler error, e.g. PROMPT 2 gives:
Also, the bits actually created by the assembler do coincide with Meindert's part but not with what the flags are supposed to do according to DOCUMENTATION.
I am confused.
Is there a newer, bugfixed version of asmnut anywhere? It looks as if asmnut was hosted in git at an earlier point in time but I could not find anything anywhere.
PS Is Christophe still around?
Thank you!
Regards,
Harald
I'm trying to get my head around building some new functions and began playing with asmnut. I have a question concerning the PROMPT feature that asmnut nicely supports.
Sadly, the way PROMPT works (and doesn't work) is not as documented in DOCUMENTATION, and it is contradictory in prompt.c.
DOCUMENTATION says,
Code:
1 := 1 Digit
2 := 2 Digits
F := 2 Digits < 56
3 := 3 Digits
S := ST
I := IND
Y := IND ST
+ := + - * /
. := . ..
a := Alpha or empty
A := non-empty Alpha
and the code in prompt.c looks like this
Code:
s_prompt_map prompt_map[ 16 ] = {
{ 0x00, 0x0000, '1', "1 Digit", }, //None
{ 0x01, 0x2000, '2', "2 Digits", }, //Alpha (null input valid)
{ 0x02, 0x02E2, 'F', "2 Digits < 56", }, //2 Digits, ST, IND, IND ST, +, -, * or /
{ 0x03, 0x4002, '3', "3 Digits", }, //2 Digits or non-null Alpha
{ -1, 0x0000, '?', "<invalid 0x10>", }, //Invalid prompt 0x10
{ 0x11, 0x0008, 'S', "ST", }, //3 Digits
{ 0x12, 0x00E2, 'I', "IND", }, //2 Digits, ST, IND or IND ST
{ 0x13, 0x40C2, 'Y', "IND ST", }, //2 Digits, IND, IND ST or non-null Alpha
{ -1, 0x0000, '?', "<invalid 0x100>", }, //Invalid prompt 0x20
{ 0x21, 0x4000, '+', "+ - * /", }, //non-null Alpha
{ 0x22, 0x00C2, '.', ". ..", }, //2 Digits, IND or IND ST
{ 0x23, 0x4002, '?', "<invalid 0x800>", }, //2 digits or non-null Alpha
{ -1, 0x0000, '?', "<invalid 0x1000>", }, //Invalid prompt 0x30
{ 0x31, 0x00C1, 'a', "Alpha or empty", }, //1 Digit, IND or IND ST
{ 0x32, 0x00C2, 'A', "non-empty Alpha", }, //2 Digits, IND or IND ST
{ 0x33, 0x44C2, '?', "<invalid 0x8000>", }, //2 Digits, IND, IND ST, non-null Alpha . or ..
};
where the left part coincides with the documentation above, and the right hand part (after //) coincides with what Meindert Kuipers wrote here.
Anyway. The flags A, a, or 2SIY appear to work and do what they are supposed to, but all others I've tried throw an assembler error, e.g. PROMPT 2 gives:
Code:
8028/0| >>> .NAME "ML" PROMPT 2 <<<
HMROM.SRC line #46: ==ERROR== Invalid prompt 2
Also, the bits actually created by the assembler do coincide with Meindert's part but not with what the flags are supposed to do according to DOCUMENTATION.
I am confused.
Is there a newer, bugfixed version of asmnut anywhere? It looks as if asmnut was hosted in git at an earlier point in time but I could not find anything anywhere.
PS Is Christophe still around?
Thank you!
Regards,
Harald