Jump to content
IGNORED

Logiker's Vintage Computing Christmas Challenge 2022


carlsson

Recommended Posts

Hi!

5 hours ago, MrFish said:

Kind of apples to oranges. @dmsc's assembler version is 87 bytes, which is really close to mine; but maybe one of these assembly whiz kids has one in the 60's...

 

This is the smallest one I have:

image.thumb.png.514d46c04737a178ef84358845e5bb15.png   image.thumb.png.1ebb9a272305290bdb66c2c0dd5cdc46.png

But it does only work in XL OS, as it calls directly to the E: put-byte routine.

 

I also have a 79 bytes one that writes directly to the screen, and works on any OS, bot does not return to DOS after execution:

image.thumb.png.cb288d1c28dcc214c6a65f98937b5c0d.png  image.thumb.png.4ca1752cf935c9160f9f68d9739a25d8.png

 

Have Fun!

 

 

  • Like 4
Link to comment
Share on other sites

19 hours ago, Panther said:

The screen location depends on memory and other factors.  Use SAVMSC ($58/$59).

 

ah right... not exactly fair since we have different models but the C64 doesn't so they can write directly to the screen I guess.

 

The minimum it adds is 4 bytes but then Altirra basic writes over it because the star is plotted on the 1st line. No issue with Atari basic.

 

Just wondering what the other folks using asm do ? hardcode the pointer or read SAVMSC ?

 

I'm thinking I'll just leave it hardcoded... it should work with any A8 with 64+KB with Altirra/Atari OS and Altirra/Atari basic

Edited by rensoup
Link to comment
Share on other sites

26 minutes ago, rensoup said:

I'm thinking I'll just leave it hardcoded... it should work with any A8 with 64+KB with Altirra/Atari OS and Altirra/Atari basic

I don't see why not. There's nothing saying you have to code for the entire series of a machine. Although you might get some flak from those who are...

 

Link to comment
Share on other sites

38 minutes ago, xxl said:

1F.Y=1TO13:F.X=1TOY:POS.4+x,Y:?"*":POS.13-Y+x,Y:?"*":POS.4+x,18-Y:?"*":POS.13-Y+x,18-Y:?"*":N.X:N.Y:pos.0,18
 

 

:)

lol    But it doesn't clear the screen.

 

It would have to be:

 

1GR.0:F.Y=1TO13:F.X=1TOY:POS.4+x,Y:?"*":POS.13-Y+x,Y:?"*":POS.4+x,18-Y:?"*":POS.13-Y+x,18-Y:?"*":N.X:N.Y:pos.0,18

 

Edit:  Lists to disk at 164 bytes and shrinks to 116 bytes.  Runs when entered.  When listed out, it's 4 lines plus 11 characters.  It's interesting BASIC doesn't truncate the line.  Very nice.   🙂

 

 

Edited by reifsnyderb
Link to comment
Share on other sites

Alright, I guess if people are going to start letting the cat out of the bag, I'm gonna post mine and move on with life.

 

This is 91 bytes (includes Atari line feeds here), prints on a clear screen, and has a goto at the end to keep the screen clear; and it's not centered. Centered version is 99 bytes.

 

0GR.0:C.42:POKE755,0:F.A=4TO8:F.B=A-4TO20-A:PL.B,A:PL.B,16-A:PL.A,B:PL.16-A,B:N.B:N.A›8G.8›

 

And here's the expanded version that can be read. I'll probably post a commented one later, if anyone is interested.


GRAPHICS 0
COLOR 42

POKE 755 , 0

FOR I = 4 TO 8

    FOR J = I - 4 TO 20 - I

        PLOT J , I
        PLOT J , 16 - I
        PLOT I , J
        PLOT 16 - I , J

    NEXT J

NEXT I

8 GOTO 8
 

star72.lst

 

[edit]

And, btw, @xxl's version above is 109 bytes (in case people are wondering).

 

Edited by MrFish
  • Like 4
Link to comment
Share on other sites

4 minutes ago, MrFish said:

Alright, I guess if people are going to start letting the cat out of the bag, I'm gonna post mine and move on with life.

 

This is 91 bytes (includes Atari line feeds here), prints on a clear screen, and has a goto at the end to keep the screen clear; and it's not centered. Centered version is 99 bytes.

 

0GR.0:C.42:POKE755,0:F.A=4TO8:F.B=A-4TO20-A:PL.B,A:PL.B,16-A:PL.A,B:PL.16-A,B:N.B:N.A›8G.8›

 

And here's the expanded version that can be read. I'll probably post a commented one later, if anyone is interested.


GRAPHICS 0
COLOR 42

POKE 755 , 0

FOR I = 4 TO 8

    FOR J = I - 4 TO 20 - I

        PLOT J , I
        PLOT J , 16 - I
        PLOT I , J
        PLOT 16 - I , J

    NEXT J

NEXT I

8 GOTO 8
 

star72.lst 91 B · 0 downloads

 

[edit]

And, btw, @xxl's version above is 109 bytes (in case people are wondering).

 

Is this in Atari BASIC?  I didn't know you could assign an ATASCII value to a color.  Very interesting.

Link to comment
Share on other sites

Hi!

29 minutes ago, MrFish said:

Alright, I guess if people are going to start letting the cat out of the bag, I'm gonna post mine and move on with life.

 

This is 91 bytes (includes Atari line feeds here), prints on a clear screen, and has a goto at the end to keep the screen clear; and it's not centered. Centered version is 99 bytes.

 

0GR.0:C.42:POKE755,0:F.A=4TO8:F.B=A-4TO20-A:PL.B,A:PL.B,16-A:PL.A,B:PL.16-A,B:N.B:N.A›8G.8›

Mmmm... tried something like this, forgot the POKE 755,0 and the result looked horrible with all the cursors drawn everywhere 🙂 

 

This would be about 3 chars less in FastBasic (no line numbers, no variable name after next, terminating with GE.A get key).

 

Have Fun!

Link to comment
Share on other sites

1 hour ago, MrFish said:

...I'm gonna post mine and move on with life.

Actually, move on with life means working on some interesting variants that I had in mind. 

 

1 hour ago, MrFish said:

This is 91 bytes (includes Atari line feeds here), prints on a clear screen, and has a goto at the end to keep the screen clear; and it's not centered. Centered version is 99 bytes.

Also, as I said, I can reduce both of these by 1 byte if I replace line #8 with just a GOTO 0. It then just repeats the program over and over. So, still no ready prompt or cursor.

 

So, my final smallest versions are actually 90 bytes and 98 bytes; I just prefer the static-screen versions.

 

Edited by MrFish
Link to comment
Share on other sites

1 hour ago, reifsnyderb said:

Is this in Atari BASIC?  I didn't know you could assign an ATASCII value to a color.  Very interesting.

Go ahead and run it in Atari BASIC. It's Pretty well-known, I thought.

 

Interesting fact: when I did my first version, I just stuck a random value into the color statement, intending to change it later to whatever was needed for the asterisk. My random value was 42. Haha...

 

  • Haha 1
Link to comment
Share on other sites

6 minutes ago, MrFish said:

Go ahead and run it in Atari BASIC. It's Pretty well-known, I thought.

Maybe I knew at one time and forgot.  It's been quite a while since I last programmed anything in Atari BASIC.  I had to get the book out.   

6 minutes ago, MrFish said:

 

Interesting fact: when I did my first version, I just stuck a random value into the color statement, intending to change it later to whatever was needed for the asterisk. My random value was 42. Haha...

 

42 is always a good number.   :-D

Edited by reifsnyderb
Link to comment
Share on other sites

11 minutes ago, _The Doctor__ said:

Considering the 'brains' at MIT decided to use cluster computing to solve for 3 cubes problem of 42... I guess they didn't get the answer to life the universe and everything is indeed *

 

sheesh

 

Maybe the 3 cubes problem is why it took Deep Thought 7.5 million years?

 

 

 

Link to comment
Share on other sites

57 minutes ago, ClausB said:

I had some trouble with PLOT so I used DRAWTO.

 

1GR.0:C.32:DR.9,9:C.42:A=8:B=8

2A=A-2:B=B-1

3DR.B,A:DR.16-A,16-B:DR.A,16-B:DR.16-B,A:DR.16-B,16-A:DR.A,B:DR.16-A,B:DR.B-1,17-A:

4IFA THEN2

I like how yours expands as it draws.

 

I was thinking of drawing in that pattern; but just for the outline.

 

One of the problems with draw compared to plot is that draw abbreviates to 3 characters, whereas plot is just 2 characters.

 

Link to comment
Share on other sites

2 hours ago, reifsnyderb said:

...............  It's interesting BASIC doesn't truncate the line.  Very nice.   🙂

Line Editor is 120 chars.

You can poke 82,0 to get a better idea. more could fit.

the line buffer allows more and you can monkey with them if need be...

Link to comment
Share on other sites

4 hours ago, MrFish said:

One of the problems with draw compared to plot is that draw abbreviates to 3 characters, whereas plot is just 2 characters.

Yikes... I'm wrong about that: plot is 3 characters too (I never looked that closely at my abbreviated code; just paying attention to total bytes). I guess it's print that's 2 characters instead. Seems kinda odd though, because it can already be abbreviated with a question mark.

 

So, I guess the real big difference is that you're using 8 drawto's in your main loop (for the 8 points) and I'm using 4 plots in my main loop.

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, MrFish said:

Yikes... I'm wrong about that: plot is 3 characters too (I never looked that closely at my abbreviated code; just paying attention to total bytes). I guess it's print that's 2 characters instead. Seems kinda odd though, because it can already be abbreviated with a question mark.

 

So, I guess the real big difference is that you're using 8 drawto's in your main loop (for the 8 points) and I'm using 4 plots in my main loop.

 

Yes, I didn't see the double loop that you did. You should submit yours so as to represent our favorite machine.

  • Like 1
Link to comment
Share on other sites

11 hours ago, rensoup said:

the C64 [..] can write directly to the screen I guess.

Colour memory on the C64 defaults to the background colour so you need two POKEs or a quick flickering of background colour, clear screen and flick the background again. That overhead adds bytes and execution time. Unfortunately there is no native PRINT AT or PLOT method, and going through Kernel calls for printing at a given position adds even more overhead than the two POKEs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...