Skip to content

Instantly share code, notes, and snippets.

View cbeust's full-sized avatar

Cedric Beust cbeust

View GitHub Profile
@cbeust
cbeust / a.kt
Created February 7, 2017 20:19
displayGraphGeneric(graph, Node::children, Node::value)
displayGraphGeneric(tree, Tree::leaves, Tree::payload)
@cbeust
cbeust / a.kt
Created February 7, 2017 20:19
class Tree(val payload: Int, val leaves: List<Tree>)
A
A1
A2
1
11
12
Root
A
A1
A2
A3
B
B1
B2
B21
~/kotlin/kobalt $ k assemble
__ __ __ __ __
/ //_/ ____ / /_ ____ _ / / / /_
/ ,< / __ \ / __ \ / __ `/ / / / __/
/ /| | / /_/ / / /_/ // /_/ / / / / /_
/_/ |_| \____/ /_.___/ \__,_/ /_/ \__/ 1.0.93
Regular compilation time: 2459 ms
Parallel build starting
╔═════════════════════════╗
~/kotlin/kobalt $ k assemble
__ __ __ __ __
/ //_/ ____ / /_ ____ _ / / / /_
/ ,< / __ \ / __ \ / __ `/ / / / __/
/ /| | / /_/ / / /_/ // /_/ / / / / /_
/_/ |_| \____/ /_.___/ \__,_/ /_/ \__/ 1.0.93
Regular compilation time: 2459 ms
Parallel build starting
╔═════════════════════════╗
; Test access to the memory card ($D000 and above).
; This is an adaptation of Zellyn's a2audit tests made to be run headlessly: https://github.com/zellyn/a2audit
; If the tests succed, $3D contains the number of successful tests
; If a test fails, the code lands on a BRK, $3D contains the number of passed tests,
; and Y is the index of the comparison that failed (1-5)
;
; Cedric Beust, cedric@beust.com, 9/17/2020
;
D1 := $d17b
;CHROME REVENGE by Abaddon
;the DOS 1k intro for Assembly 2020
;code: TomCat
;music: ern0
maxvol EQU 0
times EQU 0
Divider EQU 68
struct Window {
x: u16,
y: u16,
visible: bool,
}
impl Window {
fn new_with_visibility(x: u16, y: u16, visible: bool) -> Self {
Window {
x, y, visible
val w = Window(0, 0, visible = false, blackAndWhite = true)