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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MAX_TOKEN_SIZE 32 | |
| char str_to_tokenize[] = " x=10 >= 5 <= 6 == 1+2+3>10<100*10/455+(a+b+c)"; | |
| char current_token[MAX_TOKEN_SIZE]; | |
| int position = 0; |
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
| ASSUME ADL=1 | |
| org $40000 | |
| jp _start | |
| align 64 | |
| db "MOS" ; Header | |
| db 00 ; Version | |
| db 01 ; ADL | |
| _start: | |
| ;; Reseting Z80 segment - API will know that we working in ADL |
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
| 10 DIM S(32) : LET O=0 | |
| 20 FOR I=0 TO 32 | |
| 30 LET X = (I*(PI/16)) - PI | |
| 40 S(I)=INT(8 * (1 + SIN(X))) | |
| 50 NEXT I | |
| 55 CLS : O = O+1 | |
| 60 FOR Y=1 TO 23 : FOR X=1 TO 79 | |
| 70 COLOUR S((X*X+Y*Y+O) MOD 32) | |
| 80 PRINT "#"; | |
| 90 NEXT : PRINT |
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
| repeat_proc: | |
| getWord | |
| ld (.count + 1), de | |
| pop de | |
| push de | |
| call Interpreter.push | |
| .count | |
| ld de, 0 | |
| call Interpreter.push | |
| next |
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
| ;; Threaded forth-like code interpreter | |
| ;; (c) 2022 Alexander Sharikhin | |
| ;; Licensed under Coffeeware License | |
| ;; | |
| ;; License: | |
| ;; | |
| ;; If you're using this part of code, I'd love to hear about it. | |
| ;; Let me know by sending email to anihirash(at)gmail.com | |
| ;; | |
| ;; I'm crazy about coffee. If you treat me a delicious coffee - it |
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
| #!/bin/bash | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage: img2dxt1 <source-image> <output-name>" | |
| exit 1 | |
| fi | |
| if [ ! -f "$1" ] | |
| then | |
| echo "Input file does not exists!" |
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
| #!/usr/bin/env python3 | |
| import png | |
| import sys | |
| if (len(sys.argv) < 3): | |
| print("Usage: png2rgba555 <input.png> <output.raw>") | |
| exit(1) | |
| input_name = sys.argv[1] |
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
| rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d)) | |
| SOURCES=$(call rwildcard,rtl,*.v) | |
| RESULT=hardware | |
| TOP=top | |
| NEXTPNRPARAMS=--25k --package CABGA256 --speed 6 | |
| LPF=icesugar_pro | |
| all: $(RESULT).bin | |
| $(RESULT).bin: $(RESULT).cfg |
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
| rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d)) | |
| SOURCES=$(call rwildcard,rtl,*.v) | |
| RESULT=hardware | |
| TOP=top | |
| NEXTPNRPARAMS=--up5k --package sg48 | |
| PCF=top | |
| all: $(RESULT).bin | |
| $(RESULT).bin: $(RESULT).asc |
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
| REAL_ORG = #3c51 | |
| DICT_BEGIN = #3c49 | |
| DATA_REG = 129 | |
| CONTROL_REG = 128 | |
| RTS_LOW = #16 | |
| RTS_HIGH = #56 | |
| MACRO CHECKSUM start | |
| fin = $ | |
| chk = 0 |
NewerOlder