Author: Dr. Lutz Bellmann
Category: Christmas Challenge
System: Commodore SX-64
Language: Assembler (Turbo Macro Pro v1.2)
Len source code: dunno, Windows says the text file has 1250bytes; the code is 73 lines including comments and blank lines
Len exe file: 119 bytes
Len code only: 117 bytes
Instructions:
Simply open the "vccc23-lutz.prg" in Vice (C64 or SX-64) and run "sys4096".
Description:
The program divides the picture into diagonals. Two loops go around the figure from left to right and use a plot-like routine to set the cursor and
use the chrout routine of the kernal to put the stars. One loop for diagonals from left to right the other from right to left.
Comments:
This was a quick shot, so this is not heavily optimized. I just had a lot of fun handtyping the program on my real SX-64. Perfect evening job for just before christmas. Keep it up!
I included the Assembler file for TMP as well.
; VINTAGE COMPUTING CHRISTMAS
; CHALLENGE 2023 (VC3 2023)
; DR. LUTZ BELLMANN
; ------------------------------------
CINT = $FF81
CHROUT = $FFD2
SCR = $E56C
YPOS = $D6
XPOS = $D3
*= $1000
JSR CINT
LDX #0
L0 LDA XOORDV,X
STA XPOS
LDA YOORDV,X
STA YPOS
STX $FF
JSR LV
LDX $FF
INX
CPX #VXLEN
BNE L0
LDX #0
L1 LDA XOORDB,X
STA XPOS
LDA YOORDB,X
STA YPOS
STX $FF
JSR LB
LDX $FF
INX
CPX #BXLEN
BNE L1
RTS
LV JSR PRT
INC YPOS
LDA #19
CMP XPOS
BEQ LEXV
CMP YPOS
BNE LV
LEXV RTS
LB JSR PRT
INC YPOS
DEC XPOS
DEC XPOS
LDA #$FF
CMP XPOS
BEQ LEXB
LDA #19
CMP YPOS
BNE LB
LEXB RTS
PRT JSR SCR
LDA #"*"
JSR CHROUT
RTS
XOORDV .BYTE 0,0,0
XOORDB .BYTE 3,9,15
VXLEN = *-XOORDV
.BYTE 18,18,18
BXLEN = *-XOORDB
YOORDV .BYTE 15,9,3
YOORDB .BYTE 0,0,0
VYLEN = *-YOORDV
.BYTE 3,9,15