cowgol icon indicating copy to clipboard operation
cowgol copied to clipboard

Standard library method for getting a character from keyboard input?

Open ibara opened this issue 4 years ago • 3 comments

Hello --

(Keeping individual issues separate for organization purposes.)

Is there an easy way to get keyboard input with Cowgol? I have a Brainfuck to Cowgol transpiler: https://github.com/ibara/cowgol-utilities/blob/main/bfc.cow but it is missing an implementation for the comma operator since I could not figure out how to get keyboard input. It otherwise works perfectly fine.

Thanks!

ibara avatar Nov 16 '20 02:11 ibara

I've not thought about this yet --- honestly, the standard library needs a lot of work. There are decisions to make about things like buffering. The whole console I/O layer needs reworking, and renaming all those print_ methods to something else. Right now there's only just enough functionality to run the compiler toolchain itself.

What platforms are you mainly aiming at?

davidgiven avatar Nov 16 '20 09:11 davidgiven

OpenBSD (aka modern Unix) and CP/M on Z80/8080.

ibara avatar Nov 16 '20 15:11 ibara

Cheeky question - any news on this?

dumblob avatar Oct 18 '23 20:10 dumblob