Vintage Computing Christmas Challenge 2023
Re: Vintage Computing Christmas Challenge 2023
I have a program ready to sent in.
Re: Vintage Computing Christmas Challenge 2023
Me too, and I've thoroughly enjoyed thinking about it - and approaching constructing the pattern in different ways and seeing which I found most efficient. I've also been cursing the lack of modulo in ZX Speccy BASIC which I think would have helped. I still have a few more approaches I might explore. And I'll be very interested to see what other approaches people take.
Ii's interesting to be judged primarily on size of "source code", given that's a plain text file with the BASIC in it. So using NOT PI instead of 0 (as I'd do if I was making minimal size) is a massive no-no.
Ii's interesting to be judged primarily on size of "source code", given that's a plain text file with the BASIC in it. So using NOT PI instead of 0 (as I'd do if I was making minimal size) is a massive no-no.
CLEAR 23855
Re: Vintage Computing Christmas Challenge 2023
I can think of a few with-modulo BASICs that are all relevant to us in some way: Next BASIC, QL SuperBASIC... and BBC BASIC on the Z88.uglifruit wrote: ↑Fri Dec 08, 2023 11:27 am Me too, and I've thoroughly enjoyed thinking about it - and approaching constructing the pattern in different ways and seeing which I found most efficient. I've also been cursing the lack of modulo in ZX Speccy BASIC which I think would have helped. I still have a few more approaches I might explore. And I'll be very interested to see what other approaches people take.
Go for it!
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Re: Vintage Computing Christmas Challenge 2023
Program sent in!
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Vintage Computing Christmas Challenge 2023
I've got a BASIC one and a machine code one. Both use completely different solutions.
Re: Vintage Computing Christmas Challenge 2023
5 minutes after sending in I found a byte won, so now 1 byte below a round number.
Previous version had a round number.
Previous version had a round number.
Re: Vintage Computing Christmas Challenge 2023
Did you sent them in?MustardTiger wrote: ↑Fri Dec 08, 2023 3:57 pm I've got a BASIC one and a machine code one. Both use completely different solutions.
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Vintage Computing Christmas Challenge 2023
@Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy!
Re: Vintage Computing Christmas Challenge 2023
after the contest I got to 25 for ZX81 and 26 for ZX SpectrumMustardTiger wrote: ↑Sat Dec 09, 2023 6:39 pm @Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy!
Re: Vintage Computing Christmas Challenge 2023
I already sent in 4 programs, every time a bit shorter.
Re: Vintage Computing Christmas Challenge 2023
Hope to amaze you this year once again.MustardTiger wrote: ↑Sat Dec 09, 2023 6:39 pm @Dr beep I just saw your entry for last year on the results video, 29 bytes! Crazy!
I can't say anything, wait another week.
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Vintage Computing Christmas Challenge 2023
Just for a giggle I did it in Forth-79 (ZX81) but I don't it think would be as short as Johan's or any other offerings so will leave it and see where mine would have come in the scheme of things.
Re: Vintage Computing Christmas Challenge 2023
I stated in my coding course that everybody should code assembler since this is shorter.MustardTiger wrote: ↑Mon Dec 18, 2023 8:03 pm I'm looking forward to see the results. I've sent in an entry which I'm happy with. I ended up making an assembler version of my Basic attempt.
So was your code shorter than BASIC?
- MustardTiger
- Microbot
- Posts: 122
- Joined: Tue May 02, 2023 8:05 pm
Re: Vintage Computing Christmas Challenge 2023
My assembler one is 30% the size of the BASIC one. I do most of my speccy programming in assembler, my BASIC version of this was just to get my algorithm working.
Re: Vintage Computing Christmas Challenge 2023
Woke up this night with a wild idea.... out of bed to test... didn't work.
Hour later wope up again... another idea... out of bed.... did work, so another byte off of the code.
Hour later wope up again... another idea... out of bed.... did work, so another byte off of the code.
Re: Vintage Computing Christmas Challenge 2023
Presentation here: https://www.youtube.com/watch?v=RGv2u6epVTY&feature=youtu.be
I managed to forget to send my entry, misread the deadline. D'oh.
Was quite pleased with it as well! (116 characters, including the carriage return)
And was pleased to use the fact Spectrum basic can print at negative co-ordinates to save me an ABS. It's obviously my thing. And a DEF FN
I managed to forget to send my entry, misread the deadline. D'oh.
Code: Select all
1 CLS:FOR a=3 to 18 STEP 6:for b=0 to 35:PRINT AT FN d(b+a),FN d(b);"*":NEXT b:NEXT a:DEF FN d(x)=x-(x>18)*2*(x-18)
And was pleased to use the fact Spectrum basic can print at negative co-ordinates to save me an ABS. It's obviously my thing. And a DEF FN
CLEAR 23855
Re: Vintage Computing Christmas Challenge 2023
still imressing on winter - 23bytes
- ParadigmShifter
- Manic Miner
- Posts: 671
- Joined: Sat Sep 09, 2023 4:55 am
Re: Vintage Computing Christmas Challenge 2023
I'm just shocked that Dr. Beep did not win
Re: Vintage Computing Christmas Challenge 2023
I did it at home for fun and managed 173 bytes using Toddy Forth79 (ZX81.)
Beat the Ace Forth though which was pleasing.
Beat the Ace Forth though which was pleasing.
Re: Vintage Computing Christmas Challenge 2023
If you compare our code you will see that 99% is the same.
In my defense: I did it alone!
Re: Vintage Computing Christmas Challenge 2023
His single byte less is where I was looking for all the time.
I had the idea another byte could come off, but I didn't see it in time.
The ADD HL,BC trick was indeed the way to get H in the right value.
I did make my own 23 bytes version AFTER seeing the winner trying to make it 22
Code: Select all
org 55570
; A=18
; C=18
ld e,a
rrca
add hl,bc ; ATTEMPT TO SET H AND L BUT H ONLY SUCCEEDS NO WINS!
l1 ld b,a
call #200a ; PRINT AT C,B!!!
ld a,"*"
rst 16 ; PRINT "*"
ld a,e ; mirror X-coordinate
sub b ; A now 18-X
dec d ; repeat even number of times
jr nz,l1 ; so at the end A holds start X
sub h ; go to next X-coordinate
jr nc,l1 ; test out of screen
adc a,e ; if so repair in screen and move 1 position up
dec c
ret m
jr l1