When writing code to be compiled with SDCC targetting Z80, assembler code fragments can be inserted in the C functions by enclosing them between the __asm and __endasm; tags:
void DoNotDisturb()
{
__asm
di
| """Concurrent read-process-write example""" | |
| import concurrent.futures | |
| from itertools import islice | |
| from time import sleep | |
| import rasterio | |
| CHUNK = 100 |
| #!/usr/bin/env bash | |
| # obtains all data tables from database | |
| TS=`sqlite3 $1 "SELECT tbl_name FROM sqlite_master WHERE type='table' and tbl_name not like 'sqlite_%';"` | |
| # exports each table to csv | |
| for T in $TS; do | |
| sqlite3 $1 <<! | |
| .headers on |
| ;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
| ;by doppelganger (doppelheathen@gmail.com) | |
| ;This file is provided for your own use as-is. It will require the character rom data | |
| ;and an iNES file header to get it to work. | |
| ;There are so many people I have to thank for this, that taking all the credit for | |
| ;myself would be an unforgivable act of arrogance. Without their help this would | |
| ;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
| ;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |