This file contains 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
let output = new ArrayBuffer(0, { maxByteLength: 0x10000 }); | |
let data = new Uint8Array([1, 2]); | |
let offset = output.byteLength; // append data in this position | |
output.resize(offset + data.length); // grow buffer | |
let view = new Uint8Array(output); // get a data view for .set() | |
view.set(data, offset); // copy appended data |
This file contains 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
let output = new ArrayBuffer(0, { maxByteLength: 0x10000 }); | |
let data = new Uint8Array([1, 2]); | |
let offset = output.byteLength; // append data in this position | |
output.resize(offset + data.length); // grow buffer | |
let view = new Uint8Array(output); // get a data view for .set() | |
view.set(data, offset); // copy appended data |
This file contains 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
{ | |
"files.exclude": {}, | |
"editor.rulers": [ | |
120, | |
180 | |
], | |
"workbench.colorCustomizations": { | |
"editorRuler.foreground": "#222222" | |
}, | |
"editor.renameOnType": true, |
This file contains 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
package main | |
import ( | |
"fmt" | |
"strings" | |
"github.com/go-gl/gl/v3.3-core/gl" | |
"github.com/veandco/go-sdl2/sdl" | |
) |
This file contains 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
import "./instructions.mjs"; | |
export class Cpu6502 { | |
A = 0xFF | |
lda = lda | |
#rts = function() { | |
return "RTS"; | |
} | |
ldx() { | |
return this.lda(); |
This file contains 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
Byte dump: | |
0825: ad 00 dd - lda $DD00 | |
0828: 29 fc - and #%11111100 | |
082a: 09 03 - ora #%11 | |
082c: 8d 00 dd - sta $DD00 | |
082f: a9 19 - lda #%00011001 | |
0831: 8d 18 d0 - sta $D018 | |
// correctly sets screen mem at $400, but charset is not used from $2000 | |
// Actually in debugger, $D018 is $15 |
This file contains 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
* = $0801 "Basic" | |
.word upstartEnd // link address | |
.word 10 // line num | |
.byte $9e // sys | |
.text toIntString(Start) | |
.byte 0 | |
upstartEnd: | |
.word 0 // empty link signals the end of the program | |
Start: |
This file contains 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
// For KickAssembler | |
#import "ptz.asm" | |
BasicUpstart2(Start) | |
.memblock "Start" | |
Start: | |
DisableInterrupts() |