Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Highlighted for brainfuck, but /not/ brainfuck
- { # The INTERVAL interrupt- currently, it just records how often it's been called in cell 3
- =>> # Go to the first cell then go right by 2 (to cell #3)
- + # Increment cell 3
- % # Return to whatever was going on previously
- }
- + { # ZERO DIVISION INTERRUPT: Called when a number is divided by 0
- # Nothing to do here (we don't even use div`, so you never divide by 0)
- }
- +2 { # The KEYBOARD interrupt- Triggered when a key is pressed
- [>] # Find a cell we can interfere with
- +753664* # Go to the terminal register
- [>] # Go to the fist cell the terminal has that isn't open
- ? # Query hardware 0 (KEYBOAaD) for what key was most recently pressed
- +2560 # Colorize the cell
- % # Return to whatever was going on before (jump back to the old cell)
- }
- +16{ # Main method- called when the kernel loads
- +753664* # Go to the proper register
- +2560 # Colorize
- +107> # Print "k"
- +2560
- +101> # Print "e"
- +2560
- +114> # Print "r"
- +2560
- +110> # Print "n"
- +2560
- +101> # Print "e"
- +2560
- +108> # Print "l"
- +2560
- +32> # Print <space>
- +2560
- +98> # Print "b"
- +2560
- +111> # Print "o"
- +2560
- +111> # Print "o"
- +2560
- +116> # Print "t"
- +2560
- +105> # Print "i"
- +2560
- +110> # Print "n"
- +2560
- +103> # Print "g"
- (+>)66 # Go to the next line (width-80 display)
- +[] # Hang forever without terminating
- }: # Execute the main method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement