| Sequence | Results in |
|---|---|
\[ |
[ |
\] |
] |
\\ |
\ |
Format characters
| extern crate libc; | |
| use libc::*; | |
| use libc::funcs::posix01::signal::signal; | |
| fn main() { | |
| unsafe { signal(SIGINT, goodbye as u64); } | |
| println!("Hello, world!"); |
| 2,3c2,3 | |
| < .file "fulliter.0.rs" | |
| < .section .text._ZN4main20h34b4fa9d2be136ebeaaE,"ax",@progbits | |
| --- | |
| > .file "while.0.rs" | |
| > .section .text._ZN4main20h3118530cba082203eaaE,"ax",@progbits | |
| 5,6c5,6 | |
| < .type _ZN4main20h34b4fa9d2be136ebeaaE,@function | |
| < _ZN4main20h34b4fa9d2be136ebeaaE: | |
| --- |
| use std::env; | |
| fn main() { | |
| env::set_var("RUST_BACKTRACE", "1"); | |
| panic!(); | |
| } |
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <assert.h> | |
| enum ResultKind { Kind_Ok, Kind_Err }; | |
| typedef struct { | |
| enum ResultKind kind; | |
| union { | |
| struct { int ok; }; |
| [ '[' | |
| x exchange bg/fg colors | |
| krygbcmwn dark colors | |
| KRYGBCMW light colors | |
| h00 256-color | |
| i italics | |
| u underline | |
| c clear all formatting | |
| |[bxWu]Test|c |
| extern crate sdl2; | |
| use sdl2::pixels::Color; | |
| use sdl2::event::Event; | |
| use sdl2::keyboard::Keycode; | |
| use std::sync::mpsc::{Receiver, Sender}; | |
| enum Command { | |
| SetBG(u8, u8, u8), |
| ; Goal: to turn controller button samples, incoming on the x register each | |
| ; frame, into three variables: | |
| ; - cur, which represents the current state of the controller buttons | |
| ; - prs, which represents the buttons pressed this frame | |
| ; - rls, which represents the buttons released this frame | |
| ; | |
| ; Example: | |
| ; x cur prs rls | |
| ; ................ ................ ................ <- initial values | |
| ; ...........1.... ...........1.... ...........1.... ................ |
| trait ControllerPins { | |
| // inputs: | |
| // latch pin (normally low) | |
| fn latch_rising(&mut self); | |
| fn latch_falling(&mut self); | |
| // clock pin (normally high) | |
| fn clock_rising(&mut self); | |
| fn clock_falling(&mut self); | |
| // output: |
| bankswitch(bank, address) { | |
| push old bank to stack ; in old bank | |
| switch code bank register to new bank ; in old bank | |
| call bank:address ; in old bank | |
| ; function in new bank returns here | |
| pop old bank from stack ; in new bank | |
| switch code bank register to old bank ; in new bank | |
| jump to label in old bank ; in new bank |