Back in the day, on the C64, POKE 19,32 would suppress the "?" prompt that appeared whenever the BASIC INPUT command was used.
This doesn't work on the X16, but given how very similar the 2 versions of BASIC are, is there the same capability in the X16, and if so, what is it?
Thanks in advance.
Suppressing the "?" prompt when using INPUT
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
- JimmyDansbo
- Posts: 476
- Joined: Sun Apr 26, 2020 8:10 pm
- Location: Denmark
- Contact:
Re: Suppressing the "?" prompt when using INPUT
In the current kernle (r43) you should be able to get the same result with POKE $3DD,32
According to the C64 memory map, location 19 ($13) is the current IO channel. Called CHANNL. I searched the .sym files in the current emulator for that name and found that it points to address $3DD.
I did a quick test and the questionmark is gone if you poke 32 to $3DD. It may have other sideeffects.
According to the C64 memory map, location 19 ($13) is the current IO channel. Called CHANNL. I searched the .sym files in the current emulator for that name and found that it points to address $3DD.
I did a quick test and the questionmark is gone if you poke 32 to $3DD. It may have other sideeffects.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Suppressing the "?" prompt when using INPUT
Thanks very much!
Re: Suppressing the "?" prompt when using INPUT
You don't need any POKEs. Just use the LINPUT command, instead.
LINPUT (short for LINE INPUT in other BASIC dialects) has two differences from the regular input command:
1. It does not parse commas, semicolons, or other separate characters. Instead, they're just part of the input string.
2. It does not print the ?
LINPUT (short for LINE INPUT in other BASIC dialects) has two differences from the regular input command:
1. It does not parse commas, semicolons, or other separate characters. Instead, they're just part of the input string.
2. It does not print the ?
10 PRINT "TYPE A,B: "; 20 LINPUT A$ 30 PRINT "YOU TYPED [";A$;"]" READY. TYPE A,B: YOU TYPED [A,B]
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Suppressing the "?" prompt when using INPUT
Ooh! Much better & more useful, especially for my compiler, editing the source code!TomXP411 wrote: ↑Tue Jun 27, 2023 8:08 am You don't need any POKEs. Just use the LINPUT command, instead.
LINPUT (short for LINE INPUT in other BASIC dialects) has two differences from the regular input command:
1. It does not parse commas, semicolons, or other separate characters. Instead, they're just part of the input string.
2. It does not print the ?
10 PRINT "TYPE A,B: "; 20 LINPUT A$ 30 PRINT "YOU TYPED [";A$;"]" READY. TYPE A,B: YOU TYPED [A,B]
Thanks!
-
- Posts: 140
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Suppressing the "?" prompt when using INPUT
It looks like an empty line response when using LINPUT returns a single character, namely the space character, not an empty string or an EOL string. This is the same as actually returning an explicitly typed space character.
In fact, entering any number of 1 or more spaces ONLY, returns a single space character, and entering no characters at all returns a single space character only.
Is this a bug or designed to be this way?
I'm sure I'm not alone in wanting this to return either an empty string (preferred) or an EOL character.
In fact, entering any number of 1 or more spaces ONLY, returns a single space character, and entering no characters at all returns a single space character only.
Is this a bug or designed to be this way?
I'm sure I'm not alone in wanting this to return either an empty string (preferred) or an EOL character.
Re: Suppressing the "?" prompt when using INPUT
Yes, it should work that way: 'Due to how the editor works, an empty line will return " "– a string with a single space, and trailing spaces are not preserved.'
See: https://github.com/X16Community/x16-doc ... .md#linput
I agree that it is strange that it leaves one space when the input is empty or just spaces, but it's good that it removes trailing spaces. If it had removed only trailing spaces it would work on A$ as INPUT A$ followed by A$=RTRIM$(A$). RTRIM$() exists in some BASICs and is similar to rtrim() in PHP.
See: https://github.com/X16Community/x16-doc ... .md#linput
I agree that it is strange that it leaves one space when the input is empty or just spaces, but it's good that it removes trailing spaces. If it had removed only trailing spaces it would work on A$ as INPUT A$ followed by A$=RTRIM$(A$). RTRIM$() exists in some BASICs and is similar to rtrim() in PHP.