Published master
authorC64 <c64@mail.dagertech.net>
Fri, 16 Aug 2019 22:15:40 +0000 (15:15 -0700)
committerC64 <c64@mail.dagertech.net>
Fri, 16 Aug 2019 22:15:40 +0000 (15:15 -0700)
Makefile [new file with mode: 0644]
xchallenge.asm [new file with mode: 0644]
xchallenge.bas [new file with mode: 0644]
xchallenge.prg [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..af25304
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+# nc now linked as 'ncat'.  Had to change -q to -i
+TARGET=xchallenge
+asm:
+       @tas $(TARGET).asm -o $(TARGET).prg
+basic:
+       @prepetcat $(TARGET).bas | $$VICE/petcat -w2 -o $(TARGET).prg
+
+list:
+       @prepetcat -n $(TARGET).bas
+
+load:
+       PWD=$$(pwd)
+       echo 'load "$(PWD)/$(TARGET).prg" 0' | nc localhost 6510
+
+soft:
+       echo "reset 0" | nc localhost 6510
+
+hard:
+       echo "reset 1" | nc localhost 6510
+
+clean:
+       rm *.prg *~
+
diff --git a/xchallenge.asm b/xchallenge.asm
new file mode 100644 (file)
index 0000000..3287f3c
--- /dev/null
@@ -0,0 +1,47 @@
+       ;; Challenge to draw an 'X' on the screen
+       ;; Does not wait for keypress when done
+       ;; Couldn't tell if challenge included black border, so
+       ;;   just make backgroun black and ignored border
+
+       ;; Compiler: 64tass
+
+       *=$1000
+       
+       ;; Put cursor on line 24
+       ldx     #$18
+       jsr     $e50c
+       
+       ;; Do this after since PlaceCursor destroys registers
+       ldx     #$00
+       ldy     #$27
+       stx     $d021
+Loop:
+       txa
+       ldx     #$07    
+GetBit:
+       rol     data,x
+       dex
+       bpl     GetBit
+       tax
+       
+       bcs     PlotChar
+       lda     #$0d
+       jsr     $ffd2
+
+       bcc     loop            ; CHROUT *should* be CLCing.
+
+PlotChar:      
+       lda     #$a0
+       sta     $07c0, X        ; can't indirect-index with X
+       sta     ($d1), Y        ; $d1 holds c0 07, so save a byte
+       inx
+       dey
+       bpl     Loop
+
+exit:  
+       rts
+
+       ;; 1 = block; 0 = CR
+data:  .byte %11010110, %10110110, %10110101, %10110101
+       .byte %10101101, %10101101, %01101101, %01101011
+
diff --git a/xchallenge.bas b/xchallenge.bas
new file mode 100644 (file)
index 0000000..0b21e5b
--- /dev/null
@@ -0,0 +1,2 @@
+       print"{clr}":poke53281,0:forx=2to41:z=40*int(5/8*x):poke982+x+z,160:poke2022+x-z,160:next
+
diff --git a/xchallenge.prg b/xchallenge.prg
new file mode 100644 (file)
index 0000000..5282224
Binary files /dev/null and b/xchallenge.prg differ