Commodore 128 Basic 7.0 One Liner Competition

Started by Blacklord, December 18, 2008, 08:14 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Blacklord

We are pleased to announce the Commodore 128 Basic 7.0 One Liner Competition 2008!

Commodore 128 Basic 7.0 One Liner Competition is a friendly competition designed to see what ingenuity exists in the C128 community.

RULES

- Entries must be original
- The result must be displayable on a real C128 (or VICE)
- The competition starts Thursday December 18th 2008
- Entries must be submitted on or before March 18th, 2009
- there will be a competion page at this site with the submissions & you'll have the opportunity to vote for your favourite submission

SUBMISSIONS

- Submissions must be made by email to landover (at) tpg.com.au

PRIZES

- Prizes will be awarded on total votes & will be paid by PayPal

1st prize $AU50, 2nd prize $AU30, 3rd prize $AU20

DISCUSSION

Competition discussion only in this forum: http://landover.no-ip.com/forums/index.php?board=21.0

darkatx

After I slap my C128 back together I think I'll take a stab at it... :)

xlar54

You state Basic 7..does that mean that SYS calls to ML are out?

Blacklord

Quote from: xlar54 on December 18, 2008, 02:34 PM
You state Basic 7..does that mean that SYS calls to ML are out?

If you mean creating a separate ML program & then calling it via SYS, then yes, it's out. SYS to a system function is ok.

Lance

RobertB

Quote from: Blacklord on December 18, 2008, 08:14 AMWe are pleased to announce the Commodore 128 Basic 7.0 One Liner Competition 2008!
Do you mean one 80-character Basic 7.0 line or one line that has been crunched to have more than 80 characters?  :)

                Truly,
                Robert Bernardo
                Fresno Commodore User Group
                http://videocam.net.au/fcug
                The Other Group of Amigoids
                http://www.calweb.com/~rabel1/
                Southern California Commodore/Amiga Network
                http://www.sccaners.org/

xlar54

Well, my little encryption routine is out...considering what some of these people have managed to do in 128 bytes:

http://retrocode.blogspot.com/2008/12/what-can-you-write-in-128-bytes.html

(I would imagine 1 BASIC line wouldnt be much more than 128 bytes)

Blacklord

Quote from: RobertB on December 18, 2008, 05:45 PM
Quote from: Blacklord on December 18, 2008, 08:14 AMWe are pleased to announce the Commodore 128 Basic 7.0 One Liner Competition 2008!
Do you mean one 80-character Basic 7.0 line or one line that has been crunched to have more than 80 characters?  :)

             

Vanilla Basic :)

SmallCleverDinosaur

Lance, how do you define a BASIC-line?

It is possible to create a BASIC-line that consists of up to 252 bytes (including 2 bytes for the line number). Such a line will be a valid BASIC-line as far as the C128 is concerned. Other lines can be inserted and deleted before and after such a line and the program will still run.

The only thing is that it has to be entered with the monitor (or POKE'd or BLOAD'ed into memory) since the keyboardbuffer on the C128 is only 80 character in length. So there is no way of entering a 252 bytes line from READY-mode.

Quote from: Blacklord on December 18, 2008, 03:17 PM
If you mean creating a separate ML program & then calling it via SYS, then yes, it's out. SYS to a system function is ok.
If a BASIC-line of 252 bytes is OK in this competition, would it then be OK to have an ML program WITHIN these 252 bytes? Or should it be strictly BASIC-only (except for ML calls to routines in ROM)?

Ignorance is a precious thing. Once lost, it can never be regained.

Blacklord


airship

I would think the simple parameters would be:

  (1) Has to be a single file that can be SAVEd then DLOADed, not BLOADed.

  (2) Has to execute with RUN.

  (3) LIST should work and should show a single line, but if it just shows a line number then a bunch of crap on the screen, that's cool as long as it obeys #2 above.

How does that sound?
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

SmallCleverDinosaur

#10
Sounds good to me :)

It could look something like this:



Click the following link to see a larger picture: http://www.commodore128.org.uk/images/forumpics/one-liner.jpg

You can type it in with the MONITOR, LIST it and RUN it. Just make sure that the first 3 pairs of zeroes on the third line ($1C10) are there, otherwise it will probably not work. The "crap" that follows "SYS7179:" is a small ML routine.
Ignorance is a precious thing. Once lost, it can never be regained.

Blacklord

Quote from: airship on December 19, 2008, 05:09 AM
I would think the simple parameters would be:

  (1) Has to be a single file that can be SAVEd then DLOADed, not BLOADed.

  (2) Has to execute with RUN.

  (3) LIST should work and should show a single line, but if it just shows a line number then a bunch of crap on the screen, that's cool as long as it obeys #2 above.

How does that sound?

Agreed

Andrew Wiskow

This will require some serious thought...  Good thing I still have three months to think about it.  ;)
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

airship

Hmmm... now that I think about it, you might be able to game my definition. Here's how:

(1) Write, edit, crunch, cram, etc., your BASIC 7.0 code to fit in 252 bytes.

(2) Add M/L routine as long as you want right after your one-line BASIC program.

(3) POKE stuff to fool the BASIC SAVE command into saving not only the one-liner, but the M/L program behind it. (I'm not going to look up how to do this, but I'm 99% sure you can.)

(4) You can then DLOAD and RUN the program, though it will be however long you want to make it.

Since this clearly violates the spirit of the contest, this kind of trickery should be banned outright. If any program is longer than a single disk block, it's an obvious fraud.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

SmallCleverDinosaur


Quote from: airship on December 20, 2008, 04:32 AM
(3) POKE stuff to fool the BASIC SAVE command into saving not only the one-liner, but the M/L program behind it. (I'm not going to look up how to do this, but I'm 99% sure you can.)
This can definitely be done. In fact, that is exactly how most C64 games are saved. If you load a C64 game and list it you will see something like: 10 SYS 2061 and nothing else. That is because the LIST command considers a program to end when it finds three pairs of $00 in a row. The trick is to place the ML-code after those three pairs and then move the "end of program"-pointer beyond the ML-code and use the SAVE command. Then both the single line BASIC program will be saved together with the rest of the ML-code. The "end of program"-pointer is placed at $1210 in the C128's memorymap.

Quote
Since this clearly violates the spirit of the contest, this kind of trickery should be banned outright. If any program is longer than a single disk block, it's an obvious fraud.
Obviously, if we allowed the technic just described, the contest would no longer be a one-liner contest. So a single discblock is a very good limit. A full discblock is 256 bytes in size but only 254 bytes are used for data, the first two are used to point to the next discblock.

That means that the total amount of bytes available are 248. A basicprogram must begin with a $00 and end with four $00. The two bytes following the initial $00 points to the next linenumber (lobyte/hibyte). That means that a toal of 6 bytes are lost which leaves us 248 bytes to work with.
Ignorance is a precious thing. Once lost, it can never be regained.

Blacklord

Because I'm still in Mexico, I've decided to extend the comp end-time til after I get back (which will be mid April).

One entry alkready received from Megabit.

Lance

airship

Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Blacklord


naI

I am very curious to see what people managed to do with one line of BASIC.  When will we get to review the entries and cast our votes?
Commodore 128 w/1571, C2N, JiffyDOS, 64k VDC Upgrade

SYS 32800,123,45,6 <3

Blacklord

Quote from: naI on May 24, 2009, 03:59 AM
I am very curious to see what people managed to do with one line of BASIC.  When will we get to review the entries and cast our votes?

I'll get this restarted now I'm finally back - has been a bit of a topsy-turvy year for me so far!

airship

Shucks. I was prepared to procrastinate for another year or two. :)
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Blacklord

Quote from: airship on May 27, 2009, 01:47 AM
Shucks. I was prepared to procrastinate for another year or two. :)

Surely not :)

megabit


Say Lance, what is happening with the One Liner?


airship

I think you won because you were the only entry.

But if I had entered, I WOULD have won! :P
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

megabit


QuoteBut if I had entered, I WOULD have won! 

It's not too late!  ;D