scene.org File Archive

File download

<root>­/­parties­/­2023­/­vccc23­/­christmas-diamonds/tnt_c64_asm_vc3-2023.zip

File size:
10 761 bytes (10.51K)
File date:
2024-01-03 14:15:18
Download count:
all-time: 1

Preview

  • asmturtle/ dir
  • asmturtle/asmturtle.prg 72B
  • asmturtle/file_id.diz 1.34K
  • asmturtle/result.png 2.62K
  • asmturtle/source.png 5.23K
  • asmturtle/source.txt 473B

file_id.diz

AsmTurtle

Author: TNT / Beyond Force
Category: Christmas Challenge
System:   C64
Language: assembly
Len source code: 473
Len exe file:    72
Len code only:   58

Instructions:
Install vice, drag and drop the prg file into it

Description:

The image is drawn  much like turtle moves in Logo (*1), starting from
top left corner and moving top right. Drawing position is moved
repeatedly in the same direction until it turns 90 degrees clockwise. This
forms lines of length 3, 12, 6, 6, 12 (*2) after which the process is
repeated but the starting direction has turned 90 degrees clockwise as we
turned right five times. After the above sequence has been repeated four
times, drawing position is back where it started.


(*1) https://en.wikipedia.org/wiki/Logo_(programming_language)

(*2) These length are multiples of 1, 4, 2, 2, 4, which may be easier to
     visualize as diamond edges.


Comments:

The only reset initializiation condition this program relies on is the fact
that all registers are initialized to zero after reboot. If this is not
allowed, one can change ".link dc.w 0" into ".link ldy #0" and change the
SYS address into 2059. That increases code length by two, but keeps the
executable size intact. This works because BASIC only checks the high byte
of the next line address when it searches the end of BASIC code.