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
# c64list clone in python 2.7 | |
# heavily based on https://ruslanspivak.com/lsbasi-part6/ | |
petscii = """ !"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[~]^_ ABCDEFGHIJKLMNOPQRSTUVWXYZ""" | |
keywords = (' ', 'end', 'for', 'next', 'input#', 'print') | |
tokens = (0x20, 0x80, 0x81, 0x82, 0x83, 0x99) | |
ignore_whitespace = False |
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
import math | |
import random | |
import re | |
import time | |
import sys | |
line = "" | |
matched = None | |
cursor = 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
class CodeParser: | |
keywords = ('if', 'then', 'for', 'next', 'print') | |
txtptr = 0 | |
line = '' | |
debug = True | |
def find_keyword(self): | |
if self.debug: | |
self.display_pointer | |
if self.line[self.txtptr:self.txtptr + 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
from __future__ import print_function | |
import re | |
import os | |
### clear; python rewrite-tables.py > list.html | |
# print("cwd:", os.getcwd()) | |
# os.chdir("/home/ryan/now") | |
# print("cwd:", os.getcwd()) | |
# with file = open('classes', 'r'): # This is a big file |
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
def hex_16(value): | |
# format 16-bit 4-digit hex value | |
# return ('{:04x}'.format(value)) # returns 'xxxx', 16-bit hex value | |
return("%04X" % (value)) | |
def hex_8(value): | |
# format 8-bit 2 digit hex value | |
# return ('{:02x}'.format(value)) | |
return("%02X" % (value)) |
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
' break2.s - updated 12/4/2017 | |
' display information (current address, stack pointer, $00, $01) when BRK encountered | |
' translated from compute!s fast assembler to c64list3.05: | |
' <http://www.commodoreserver.com/Downloads.asp> | |
' perhaps xa would work better: | |
' <http://www.floodgap.com/retrotech/xa/> | |
{number:10} | |
sys{sym:setup} |
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
; portion of code is combining 3-key rollover method of scanning keyboard, | |
; omitted to just focus on re-entrant cursor blink function | |
orig $c000 ; original was $c500 | |
CAS1 = $c0 ; Tape Motor Interlock (temp storage | |
LSTX = $c5 ; Matrix Coordinate of Last Key Pressed, 64=None Pressed | |
SFDX = $cb ; Matrix Coordinate of Current Key Pressed | |
BLNSW = $cc ; Cursor Blink Enable: 0=Flash Cursor | |
BLNCT = $cd ; Timer: Countdown to Blink Cursor |
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
{asm} | |
{undef:basic} | |
; gzchat | |
; scratch above screen | |
ox = $07e8 ; x pos for output | |
ix = $07e9 ; x pos for input line | |
inlen = $07ea ; # chars in input buf | |
inpos = $07eb ; char pos in input buf | |
kbflag = $07ec ; input flags: |
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
DISKIMAGE = test-disk.d64 | |
DISKNAME = ud-backport | |
DISKID = rs | |
WINE = wine | |
C64LIST = c64list3_05.exe | |
C64LISTFLAGS = -ovr -verbose | |
CASM = casm.exe | |
C1541 = c1541 |
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
# % is a wildcard | |
# $< is the first dependency | |
# $@ is the target | |
# $^ is all dependencies | |
C1541 = c1541 | |
OUTPUT_DISK = test.d81 | |
OUTPUT_PATH = ../text-listings | |
OBJECTS = $(OUTPUT_PATH)/boot.prg \ |
OlderNewer