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
| !cpu w65c02 | |
| !macro SYS_LINE .main { | |
| *=$801 | |
| !word .next_line ; Pointer to next BASIC line | |
| !word $000A ; Line number $000A = 10 | |
| !byte $9E ; SYS BASIC token | |
| !byte 48+(.main/1000)%10 ; Address where ASM starts in PETSCII | |
| !byte 48+(.main/100)%10 | |
| !byte 48+(.main/10)%10 | |
| !byte 48+(.main/1)%10 |
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
| # Build X16 emulator webassembly: | |
| # Install emscripten: | |
| # https://emscripten.org/docs/getting_started/downloads.html | |
| git clone https://github.com/emscripten-core/emsdk.git | |
| cd emsdk | |
| # Fetch the latest version of the emsdk (not needed the first time you clone) | |
| git pull |
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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Perler på snor</title> | |
| <script> | |
| let chosencolor='white'; | |
| let colorid=1; | |
| function change_chosen_color(color) { | |
| chosencolor=color; |
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
| .segment "STARTUP" | |
| .segment "INIT" | |
| .segment "ONCE" | |
| .segment "CODE" | |
| IRQVECTOR = $0314 | |
| VERA_IEN = $9F26 | |
| VERA_ISR = $9F27 | |
| CHROUT = $FFD2 |
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
| !cpu 65c02 | |
| VERA_ADDR_L = $9F20 | |
| VERA_ADDR_M = $9F21 | |
| VERA_ADDR_H = $9F22 | |
| VERA_DATA0 = $9F23 | |
| VERA_CTRL = $9F25 | |
| VERA_DC_VIDEO = $9F29 | |
| VERA_DC_HSCALE = $9F2A | |
| VERA_DC_VSCALE = $9F2B | |
| VERA_DC_HSTOP = $9F2A |
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
| !cpu 65c02 | |
| ; BASIC program ("10 SYS $0810") | |
| *=$0801 | |
| !word $080C ; Pointer to next BASIC line | |
| !word $000A ; Line number $000A = 10 | |
| !byte $9E ; SYS BASIC token | |
| !pet " $810",0 ; Address where ASM starts | |
| !word $0000 ; EOF BASIC program | |
| *=$0810 |
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
| *=$0801 | |
| !word $080C ; Pointer to next BASIC line | |
| !word $000A ; Line number $000A = 10 | |
| !byte $9E ; SYS BASIC token | |
| !pet " $810",0 ; Address where ASM starts | |
| !word $0000 ; EOF BASIC program | |
| *=$0810 | |
| CHROUT = $FFD2 | |
| SEED = $9F64 ; VIA timer low-byte |
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
| *=$0801 | |
| !byte $0C,$08,$0A,$00,$9E,' ','2','0','6','4',$00,$00,$00 | |
| *=$0810 | |
| VERA_BASE = $9F20 | |
| VERA_ADDR_L = VERA_BASE | |
| VERA_ADDR_M = VERA_BASE+1 | |
| VERA_ADDR_H = VERA_BASE+2 | |
| VERA_DATA0 = VERA_BASE+3 | |
| VERA_DC = VERA_BASE+9 |
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
| *=$0801 | |
| !byte $0C,$08,$0A,$00,$9E,' ','2','0','6','4',$00,$00,$00 | |
| *=$0810 | |
| VERA_BASE = $9F20 | |
| VERA_ADDR_LOW = VERA_BASE+0 | |
| VERA_ADDR_HIGH = VERA_BASE+1 | |
| VERA_ADDR_BANK = VERA_BASE+2 | |
| VERA_DATA0 = VERA_BASE+3 | |
| VERA_DATA1 = VERA_BASE+4 |