Vintage Computing Christmas Challenge 2022 (VC³ 2022)

Confirmed in the IBM 5100 BASIC User Guide, it is 1-based index arrays. And array lengths can only be up to 255 (not 256), so I suspect the “0th” entry is used to store the array length (like strings in Pascal, if I recall correctly).

MATLAB is also 1-based arrays. I think the reason might be as more “engineering” focused tools (like the original IBM 5100), math-folks starts matrices with like “a11” (i.e. 1 1 as the top left corner), so it’s more “natural” to think from index 1 in that domain?

But what about the early HP calculators (the “one line screen personal computers”) - some had APL, but others did have BASIC also right? Not sure if they 0 or 1-based. Just I recall pre-1970 there were sort of “2 main branches”/evolutions of BASIC, then of course the many variants following the 1975 MS-BASIC.

So I finally got to where my IBM 5100 is at. I wasn’t sure if that system allowed “*” to be in its filenames. But since it allows 17 up to character file names, it occurred to me it would have been perfect for the 17x17 star. The “strict” requirements state the star has to be on its own - probably deliberately to avoid these kind of submissions - so it would have to be in the “wild” category. But it does work: creating 17 files on the tape (MARK 1,17,6) and naming them appropriately (I started at file number 6 since I was using file index 1-5 for other stuff and didn’t want to open another tape). Still, 1975 tech, out of the box :smiley:

The “UTIL” command is a valid BASIC command (on this system) and runs under its BASIC interpreter. But still, iffy to call it a program :wink:

An alternative is to read it from a file and show it:

10 OPEN FL1,'E80',IN
20 FOR N = 1 TO 17
30   GET FL1,A$(N)
40   PRINT A$(N)
50 NEXT I

The file would be created using another program that uses PUT FL1, etc.

This system won’t let you combine statements on a line, so this still ends up being 50-60 bytes. I wonder if the APL equivalent on this system would be smaller - a suitable excuse to finally learn some APL ! If you can find where BASIC or APL is storing A$ in memory, you could skip the PRINT statement – then just use the DCP monitor to directly view (D-Display command) the memory contents (that would form the star – but it would still be “wild” category since the ShowRegisters button and DCP-display both just show hex values, not the " "space and " * " star).

I think elsewhere, serato mentioned the submission had the wrong screenshot. The code was correct (or the correction results in the same number of bytes). So, I think it has been deemed a valid submission (code-wise).

But there is an earlier C64 BASIC submission that is malformed. (5:00 minute mark in the video, I think)

Still, the diversity of submissions is neat - and how a casual observer (non-programmer) would have no idea what the code is doing.

Ha, I wonder what ChatGPT would do for this :slight_smile:

I found this interesting print magazine series by forum64 “Christmas for the Commodore”.

Maybe something for next year. Originally for different Commodore computers including PET, Vic20 and Mega65.
Some graphics might be too complicated for simple computers including colors.
It also has animations and games.
Some more info and links here
https://www.c64-wiki.de/wiki/Weihnachten_auf_dem_Commodore

Late to the party as usual, heres my quick attempt on the National Semiconductors SC/MP under KitbugPlus. 73 hex bytes of machine code, a good chunk of which is handling that pesky 17th character!

3 Likes

Very nice! I get the impression it’s not an easy micro to program - had my eye on the MK14 when it came out, but never had one.

Ed, if you’re in the UK I will send you a PIC14 pcb FoC and (if I can find one) a programmed 876
If you’re elsewhere I’d have to ask for shipping costs. Lots of chat on the Vintage Radio forum, eg:
https://www.vintage-radio.net/forum/showthread.php?t=196677
Karens PIC14 page: http://techlib.com/area_50/Readers/Karen/micro.htm#PIC14
Cheers
Phil

Thanks @Phil_G that’s a very kind offer! Unfortunately, where my then-16 year old brain might have got to grips with programming such a beast, I fear my now-60 year old brain wouldn’t be up to it and do any justice to such a generosity.

Great project, though!

(All ages approximate!)

Neat, I wasn’t familiar with SC/MP.

Why the NOP at the start? I think I saw NOP used in a few other submissions. I assume maybe to force some kind of address alignment?

The SC/MP increments the PC before the instruction fetch so it becomes habit to start every SC/MP program with a NOP. As far as I’m aware this ‘feature’ is unique amongst period micros… :slight_smile:

2 Likes

Saw Phil_G’s YouTube video, and it inspired me to have a go. (much too late for the competition, of course).

I observed that, starting with a 17x17 square filled with stars, it’s only necessary to erase two 4x4 right triangles. Both triangles have their orthogonal corners top right and the coordinates of those two corners are (0, 3) and (0, 8) Origin is top left, with y increasing downwards.

Once those two are erased, then two symmetries are sufficient to do the rest - one mirror reflection about the diagonal top left to bottom right, and another mirror reflection about the vertical centreline.

Here it is, in ANS Forth

\ https://logiker.com/Vintage-Computing-Christmas-Challenge-2022
#17 base ! \ christmas star is a 17x17 square, with portions of perimeter cut away
0 value x
0 value y
create star 100 allot \ holds star. Remember we're working base 17 where 100 is 17x17 decimal
star 100 '*' fill \ print stars everywhere unless cut away
: xmas
  100 0 do \ loop over elements
    i 10 /mod to y to x
    x 0= if cr then
    y x > if \ lower left half of square is mirror-copy of upper right half
      x 10 * y + star + c@ star i + c!
    else x 8 > if \ right half of square is mirror-copy of left half
      y 10 * #16 x - + star + c@ star i + c!
    \ erase the 4x4 right triangles with their right angle corners (top right) at (3, 0) and (8, 0)
    else x 4 < x y < 0= and if \ (x < 4) and (x >= y)
      star i + dup bl swap c! 5 + bl swap c!
    then then then
    star i + c@ emit \ print element
  loop cr
;
xmas

It should run under any ANS Forth. For example GFORTH, which is free, and available for most platforms. If the program is saved as xmas.fth, then, from the command line, you can just execute:

gforth xmas.fth

2 Likes

Kudos for using Forth. And base 17!

2 Likes

Hi. Do you still have that computer? Can I ask you something?

I haven’t found any information about the size of the IBM 5100 all over the internet. I thought that someone would help me on this forum.

The IBM 5100 is (W×D×H) 45 × 61 × 20 cm, or in inches, 17.5 × 24 × 8, and weighs 24 kg (50 lbs, ca.).

There’s also the IBM 5103 printer (132 chars. at 10 chars/inch), which is (W×D×H) 59 × 34 × 19 (with feed 31) cm, or 23 × 13.25 × 7.25 (12.25) inch, at 26 kg (56 lb), and the IBM 1506 Auxilliary Tape Drive at (W×D×H) 31 × 26 × 19 cm or 12.25 × 10 × 7.5 inch (at 8 kg / 18 lb).

Source: Katzan, Harry, Jr., The IBM 5100 Portable Computer; Van Nostrand Reinhold, London – Toronto – Melbourne, 1977. (A 3rd party manual.)

Mind that 19cm is once given as 7.25" (in an illustration), and once as 7.5" (in descriptive text). I guess, the original measurements were in cm and kg.

Update: There are dimensions provided in the Manintenance Information Manual, in Appendix B, https://bitsavers.org/pdf/ibm/5100/SY31-0405-3_IBM_5100_Maintenance_Information_Manual_Oct1979.pdf.

The exact dimensions of the 5100 are (W×D×H): 445 × 609.6 × 203 mm or 17.5 × 24 × 8 inch, at 24 kg (50 pounds).

Bonus Content: As a tribute to our times :slight_smile: , ChatGPT hallucinates with impressive precision:

The IBM 5100 Portable Computer had dimensions of 19.25 x 12.375 x 7.375 inches (48.9 x 31.4 x 18.7 cm).

(I think, it’s important to document things, as long as we can still find them.)

2 Likes

Thank you very much!!

Forgive me for my annoyance, but let me ask one more question. What is the size of a standard keyboard key, such as the “K” key?

In general, or spefically? :slight_smile:
As for the IBM 5100, you may possibly find the answer in the 5100 Parts Catalog: https://bitsavers.org/pdf/ibm/5100/S131-0599-3_IBM_5100_Portable_Computer_Parts_Catalog_Nov1976.pdf

I meant the size of one particular key. Now I will try to search in the catalog, but it seems to me there is no such information.

So, very specifically… :slight_smile:
The IBM 5100 is just one of my “favorite computers, I’ll probably never own”, so I’ve just some information that was available in print. It doesn’t look like there’s any such information in the Parts Catalog or the Maintenance Information Manual (the latter is actually surprisingly detailed on the matter, like how to disassemble key switches). However, given that IBM was pretty much monopolizing maintenance and parts, it would be somewhat surprising to find information like key dimensions. In photos, it looks much like all keys of a row are sharing the same profile.

Maybe @voidstar could risk a measurement? (It may be tricky to determine the exact profile, though.)

I see. I hope he sees my message :upside_down_face: