Lo-Hi, Guess a number game

73 views
Skip to first unread message

Austin Erickson

unread,
Mar 30, 2023, 3:17:25 PM3/30/23
to uKenbak-1
I wanted to create a guess a number game, but wanted it to be less than 64 bytes to fit in one of the smaller memory locations on the 1k EEPROM. If you are able to test it out let me know. Here it is:

//Lo-Hi Guess A Number Game
//52-bytes
//Adr: A   B    X     P
000: 000 000 000 035 134 200 134 377
010: 000 024 377 014 204 044 035 312
020: 201 344 031 023 360 034 200 344
030: 006 023 017 344 025 023 177 034
040: 200 124 204 072 377 272 377 344
050: 043 103 001 372 377 344 051 134
060: 204 123 000 344 004 000 000 000

Ricky Bryce

unread,
Mar 31, 2023, 1:22:06 PM3/31/23
to uKenbak-1
I don't have mine handy right now, but tried it out on the web emulator.  http://www.neocomputer.org/kenbak/kenbak1-JS.html  I just pasted the code below into the memory loader.  It seems to be running, but do you have a description of how how you meant for it to work?  When it runs, and I hit a button, the lights blink for digits I have not already selected.  output 7 is off, and if I hit button 7, the program stops.  Looks like you're pretty good with the Kenbak Code! -- Ricky

INIT:

000: 000 000 000 035

004: 134 200 STB DISPLAY
006: 134 377 STB INPUT
010: 000 HLT
011: 024 377 LDA BUTTONS
013: 014 204 SUBAM [204]
015: 044 035 JPD A=0 035
017: 312 201 SKIP 1 ON BIT 1
021: 344 031 JPD UNC 031
023: 023 360 LDAI 360
025: 034 200 STA DISPLAY
027: 344 006 JPD UNC 006
031: 023 017 LDAI 017
033: 344 025 JPD UNC 025
035: 023 177 LDAI 177
037: 034 200 STA DISPLAY
041: 124 204 LDBM [204]
043: 072 377 SET 0 BIT 7
045: 272 377 SKIP 0 ON BIT 7
047: 344 043 JPD UNC 043
051: 103 001 SUB B 1
053: 372 377 SKIP 1 ON BIT 7
055: 344 051 JPD UNC 051
057: 134 204 STBM [204]
061: 123 000 LDBI 000
063: 344 004 JPD UNC 004
065: 000 000 000 HLT

Austin Erickson

unread,
Apr 5, 2023, 5:05:14 PM4/5/23
to uKenbak-1
Thanks for your response, and testing it out. Yes you can just copy and paste to (http://www.neocomputer.org/kenbak/kenbak1-JS.html)  You are right about the startup All the lights are on except Button 7. You press this button and the program will stop because it is ready for your input now. Enter a number from 0 to 255 and then hit the [Start] button it will tell you if it is too high or too low by lighting up four lights on the right or left. try to enter 11111111 first and that will usually be too high, then try entering 00000001 and that will be too low, Just start entering a number and the Lo-Hi LED's will go away, always hit start after you enter your number and it will take a while before you get to the answer which will show the 01111111 lights then you can press button 7 to play again.
Reply all
Reply to author
Forward
0 new messages