ScratchData LogoScratchData
Back to ScratchMan544's profile

Binary Console

SCScratchMan544•Created October 15, 2016
Binary Console
6
4
185 views
View on Scratch

Description

I've made a simple API for a binary console. In this project, I've implemented a "cat program," which is a program that just takes input and echoes it back out. (It uses hacked blocks for backspace and enter detection, credit to @TheHacker.) The format of the blocks is similar to Python3: print(text): prints text, followed by a newline. print(text, end=""): prints text, without a trailing newline. newline: prints a newline. input(text): prints the string text and then takes input getch(): lets the user enter a character, but does not print it to the screen. printchar(char): prints the character forward: moves the pointer forward without printing anything (like a space) del: deletes a character from the console. It will on wrap lines, but not on pages. clear: clears the screen. There is one issue: If the user input is too long, than it will wrap to the next page. This means that if the user tries to further backspace past that point, it will cause very strange behavior. Try not to do this. Thanks :) The console has support for line wrapping and will automatically clear the screen one it fills up. This is kind of slow, but oh well. You could probably make an entire OS just with this...

Project Details

Project ID125765158
CreatedOctober 15, 2016
Last ModifiedOctober 27, 2016
SharedOctober 15, 2016
Visibilityvisible
CommentsAllowed