davidgiven / cowgol

A self-hosted Ada-inspired programming language for very small systems.
BSD 2-Clause "Simplified" License
240 stars 20 forks source link

Standard library method for getting a character from keyboard input? #89

Open ibara opened 3 years ago

ibara commented 3 years ago

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!

davidgiven commented 3 years ago

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?

ibara commented 3 years ago

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

dumblob commented 11 months ago

Cheeky question - any news on this?