This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;put Hello World using screen address | |
;rather than jsr $e716 | |
processor 6502 | |
org $1000 | |
jsr $E544 ;clear the screen | |
;set the screen color memory | |
lda #0 ;black in A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// code nicked mainly from here: | |
// http://lazyfoo.net/tutorials/SDL/50_SDL_and_opengl_2/index.php | |
/* to compile | |
### installation on ubuntu | |
# install compiler etc | |
sudo apt-get install --yes software-properties-common g++ make | |
# install sdl2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |