TheThirdOne / rars

RARS -- RISC-V Assembler and Runtime Simulator
Other
1.14k stars 217 forks source link

ReadChar vs ReadString syscall in API #172

Closed maxgarman closed 1 year ago

maxgarman commented 1 year ago

Is there a way to differentiate between reading STDIN as a String vs a series of chars when calling .setup()? I have a program I want to run where I read "123456782" as both "123456782" and '1''2''3''4''5''6''7''8''2' but I cannot get the char half to work.

TheThirdOne commented 1 year ago

ReadChar consumes a full input line when run without the GUI. Generally the Read system call would be better suited to reading single bytes unless you want popups in RARS for user input.