+MrFish Posted December 10, 2022 Share Posted December 10, 2022 1 hour ago, reifsnyderb said: I found out that Atari BASIC doesn't use the abbreviates to save to disk, so I wrote a program to convert a listed filed to an abbreviated listed file. No need... our friend @dmsc has already done that (and more) for us. Turbo-Basic XL and Atari BASIC parser tool Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted December 10, 2022 Share Posted December 10, 2022 25 minutes ago, MrFish said: No need... our friend @dmsc has already done that (and more) for us. Turbo-Basic XL and Atari BASIC parser tool lol. Maybe I should have asked first. 🙂 I did a brief search, didn't find anything, and wrote a quick program. (I did use DiskEdit to modify the file first and test the idea.) Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 10, 2022 Share Posted December 10, 2022 4 hours ago, reifsnyderb said: lol. Maybe I should have asked first. 🙂 I did a brief search, didn't find anything, and wrote a quick program. (I did use DiskEdit to modify the file first and test the idea.) That parser tool pretty handy; it has some nice options, including allowing you to write your code without line numbers (then it adds them when you parse). Quote Link to comment Share on other sites More sharing options...
rensoup Posted December 10, 2022 Share Posted December 10, 2022 (edited) Made my own asm attempt (hidden result) Quote 88 bytes including the 6 bytes xex header. I'm guessing we'll see entries below 80 bytes... I'm assuming that the screen is always at $9c40, is that ok ? I didn't clear the cursor either... it's kind of conflicting to allow a ready prompt but not the cursor and at the same time not require the screen to be cleared Quote Do I need to clear the screen? No. Usually, you will paint / write on new, empty lines below the cursor. Just don't interfere with the OS messages, which are above the cursor, usually. Can I write over system messages, or do I have to write starting below the cursor? Well, you can write everywhere. Also, over the system messages. But your algorithm should not be based on the system message or require it. You could even delete the screen by hand before running your code. edit: I guess it's ok to leave the cursor Edited December 10, 2022 by rensoup Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 10, 2022 Share Posted December 10, 2022 49 minutes ago, rensoup said: I didn't clear the cursor either... it's kind of conflicting to allow a ready prompt but not the cursor and at the same time not require the screen to be cleared My assembler version has no cursor, no clear screen and no ready prompt, it's also quite tiny Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 (edited) I've broken the 100 byte barrier. No more version with the cursor showing, as it doesn't save any bytes at this point. So, I just have non-centered @ 94 bytes [formerly 105 bytes] and centered @ 100 bytes [formerly 112 bytes] (both on a clear screen... and it's Atari BASIC). I can also reduce both of these by 1 byte, by looping continuously. It's allowed by the rules; but I prefer the static versions to calling Gr. 0 and redrawing repeatedly. Edited December 11, 2022 by MrFish 1 Quote Link to comment Share on other sites More sharing options...
rensoup Posted December 11, 2022 Share Posted December 11, 2022 10 hours ago, TGB1718 said: My assembler version has no cursor, no clear screen and no ready prompt, it's also quite tiny You may be doing it wrong though 🙃 (saved a few more bytes) Quote Link to comment Share on other sites More sharing options...
dmsc Posted December 11, 2022 Share Posted December 11, 2022 Hi! Here is my brute-force attempt in Turbo BASIC and assembler, it clears the whole screen and draws somewhat centered star.... 217 bytes saved basic, 138 bytes listed basic, 87 bytes assembly. Can we post the programs? Have Fun! Quote Link to comment Share on other sites More sharing options...
reifsnyderb Posted December 11, 2022 Share Posted December 11, 2022 (edited) Well, since I am pretty much out of the size competition, this was my first attempt at 216 bytes when listed and "shrunk" on the disk. This is in Atari BASIC Rev. C. I've got another version that's much smaller by mathematically computing the shapes but I haven't been able to get close to the smallest reported sizes. I am looking forward to eventually seeing the source code to see how a BASIC program to do this can get a lot smaller. Edited December 11, 2022 by reifsnyderb Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 (edited) 43 minutes ago, dmsc said: Can we post the programs? The rules say not; and it makes some sense, as it could influence other people's work. The rules also say not to tell the file size beforehand; but I think that helps make it more competitive -- even though it's not supposed to be a competition; for me, the competitive part makes it more interesting. Edited December 11, 2022 by MrFish Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 2 hours ago, MrFish said: So, I just have non-centered @ 94 bytes [formerly 105 bytes] and centered @ 100 bytes [formerly 112 bytes] (both on a clear screen... and it's Atari BASIC). 91 bytes & 99 bytes Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 1 hour ago, dmsc said: 217 bytes saved basic, 138 bytes listed basic, 87 bytes assembly. I've been waiting for you to show up. No Fast BASIC version? Quote Link to comment Share on other sites More sharing options...
Panther Posted December 11, 2022 Share Posted December 11, 2022 For those using BASIC, don't you need to add 8K to your size figures? 😁 2 Quote Link to comment Share on other sites More sharing options...
Panther Posted December 11, 2022 Share Posted December 11, 2022 13 hours ago, rensoup said: I'm assuming that the screen is always at $9c40, is that ok ? The screen location depends on memory and other factors. Use SAVMSC ($58/$59). 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 25 minutes ago, Panther said: For those using BASIC, don't you need to add 8K to your size figures? 😁 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 11, 2022 Share Posted December 11, 2022 8 hours ago, rensoup said: You may be doing it wrong though 🙃 This is my screen although no as small as @MrFish I look forward to seeing all other people approach I think I shrank my brain more than the code try to reduce the programs size 🤣 2 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 (edited) 1 hour ago, TGB1718 said: This is my screen although no as small as @MrFish I look forward to seeing all other people approach I think I shrank my brain more than the code try to reduce the programs size 🤣 It's good exercise, learning how to optimize on these limited machines... Is that your BASIC or machine code program you're talking about (or both)? Edited December 11, 2022 by MrFish Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 11, 2022 Share Posted December 11, 2022 26 minutes ago, MrFish said: Is that your BASIC or machine code program you're talking about (or both)? They both look the same, but that was the machine code I ran for that one Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 (edited) 5 hours ago, TGB1718 said: They both look the same, but that was the machine code I ran for that one I meant, which one has the smaller file size? Edited December 11, 2022 by MrFish Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 11, 2022 Share Posted December 11, 2022 13 minutes ago, MrFish said: I meant, which one has the smaller file size? The assembler one, can't get that close to your BASIC ones Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 40 minutes ago, TGB1718 said: The assembler one, can't get that close to your BASIC ones 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... Quote Link to comment Share on other sites More sharing options...
EdwardianDuck Posted December 11, 2022 Share Posted December 11, 2022 I'm certainly no whiz kid, but I'm down to 75 bytes in assembly (not centered) (or 74 bytes if one doesn't care about Atari DOS making a mess of the lines below the star on exit). I consider that I've employed some pretty sketchy / dirty programming even to get down this far and I'm finding it interesting that I'm having to use different optimisation tricks on the Atari to what I used on the BBC micro. Some of the tricks I used here would actually increase the size of the BBC micro version. 1 Quote Link to comment Share on other sites More sharing options...
+MrFish Posted December 11, 2022 Share Posted December 11, 2022 One of the main problems with an Atari BASIC ATASCII listed file is that it includes colons between each instruction (or line numbers, if you prefer those... haha); and then instructions, even abbreviated, are at least 2 bytes because they include a period. Commands like POKE and others have no abbreviation. So, I would expect an equal BASIC list file to bigger by quite a few bytes. It'll be interesting to see what methods have been used upon the reveal. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted December 11, 2022 Share Posted December 11, 2022 48 minutes ago, MrFish said: but maybe one of these assembly whiz kids has one in the 60's... That's tomorrows task 🤓 Quote Link to comment Share on other sites More sharing options...
EdwardianDuck Posted December 11, 2022 Share Posted December 11, 2022 Spotted another trick. Down to 74/73 now. 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.