mirror of
https://github.com/irmen/prog8.git
synced 2025-01-24 06:30:24 +00:00
tweaks
This commit is contained in:
parent
4c98070b3c
commit
966b017670
@ -597,10 +597,10 @@ main {
|
||||
main {
|
||||
sub start() {
|
||||
uword @shared a,b
|
||||
b = a ; works
|
||||
cx16.r1L = lsb(a) ; works
|
||||
funcw(a) ; works
|
||||
funcb(lsb(a)) ; fails :-( TODO FIX
|
||||
b = a
|
||||
cx16.r1L = lsb(a)
|
||||
funcw(a)
|
||||
funcb(lsb(a))
|
||||
}
|
||||
|
||||
sub funcw(uword arg) {
|
||||
|
@ -64,7 +64,7 @@ adpcm {
|
||||
pstep_2 = t_step[index_2]
|
||||
}
|
||||
|
||||
sub decode_nibble(ubyte nibble) {
|
||||
sub decode_nibble(ubyte @zp nibble) {
|
||||
; Decoder for nibbles for the first channel.
|
||||
; this is the hotspot of the decoder algorithm!
|
||||
; Note that the generated assembly from this is pretty efficient,
|
||||
@ -100,7 +100,7 @@ adpcm {
|
||||
pstep = t_step[index]
|
||||
}
|
||||
|
||||
sub decode_nibble_second(ubyte nibble) {
|
||||
sub decode_nibble_second(ubyte @zp nibble) {
|
||||
; Decoder for nibbles for the second channel.
|
||||
; this is the hotspot of the decoder algorithm!
|
||||
; Note that the generated assembly from this is pretty efficient,
|
||||
|
@ -1,5 +1,4 @@
|
||||
%import textio
|
||||
%zeropage basicsafe
|
||||
|
||||
; Recursive N-Queens solver.
|
||||
; The problem is: find all possible ways to place 8 Queen chess pieces on a chess board, so that none of them attacks any other.
|
||||
@ -68,5 +67,7 @@ main {
|
||||
uword duration=100*cbm.RDTIM16()/6
|
||||
txt.print_uw(duration)
|
||||
txt.print(" milliseconds\n")
|
||||
repeat {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,11 +32,14 @@ class AsmList:
|
||||
value, symbol, _ = line.split(maxsplit=2)
|
||||
value = value[1:]
|
||||
if value:
|
||||
if value[0] == '$':
|
||||
address = int(value[1:], 16)
|
||||
else:
|
||||
address = int(value)
|
||||
symbols[symbol] = (address, index)
|
||||
try:
|
||||
if value[0] == '$':
|
||||
address = int(value[1:], 16)
|
||||
else:
|
||||
address = int(value)
|
||||
symbols[symbol] = (address, index)
|
||||
except ValueError:
|
||||
pass
|
||||
elif line[0] == '>':
|
||||
value, rest = line.split(maxsplit=1)
|
||||
address = int(value[1:], 16)
|
||||
|
Loading…
x
Reference in New Issue
Block a user