Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Connect4 for DOS in 255 bytes

35 views
Skip to first unread message

Kerr-Mudd, John

unread,
Feb 13, 2024, 2:56:55 PMFeb 13
to
Been a while, and the thread has expired from my usenet list, but here is
a tweaked version - it now hilites the /whole/ row when a win is
detected.
Two player game, no AI (sorry).
Cursor L/R to move current player's piece, Enter to drop. (Esc to quit).
Number of wins at top left & top right above 'board'
Uses Bios int10 for screen & int16 for keyboard.
Assumes ax=0 at start to change to 40x25 text mode.

grdb dump:

-> d 100 lFF
1639:0100 B7 B8 8E C3-8E DB CD 10-B9 06 00 BF-EC 02 B8 5F ..............._
1639:0110 77 AB E8 D8-00 AB 83 C7-3E E2 F6 B1-09 F3 AB BF w.......>.......
1639:0120 1E 05 E8 C8-00 BA 2A 00-BD 23 0C BB-4F 0E 87 EB ......*..#..O...
1639:0130 BF A4 02 89-1D B4 00 CD-16 C7 05 20-02 3C 1B 74 ........... .<.t
1639:0140 3E 3C 0D 75-3B E8 4E 00-74 E9 72 E2-88 F8 98 B1 ><.u;.N.t.r.....
1639:0150 03 D3 E0 05-3E 02 97 88-FC 4F 4F B0-30 87 05 0C ....>....OO.0...
1639:0160 30 40 3C 3A-74 F3 88 05-B1 06 BE F9-01 BF 1E 05 0@<:t...........
1639:0170 2E AC AA 47-E2 FA 98 CD-16 24 DF 3C-59 74 89 C3 ...G.....$.<Yt..
1639:0180 86 C4 2C 4B-24 02 48 D1-E0 01 F8 3C-9E 72 A4 3C ..,K$.H....<.r.<
1639:0190 AA 77 A0 97-EB 9D 89 F8-83 C7 50 80-3D 20 74 F8 .w........P.= t.
1639:01A0 83 EF 50 29-F8 74 D8 89-1D 4A 75 03-58 EB B9 B8 ..P).t...Ju.X...
1639:01B0 02 00 E8 12-00 73 35 B0-B2 E8 0B 00-73 2E 40 40 .....s5.....s.@@
1639:01C0 E8 04 00 73-27 48 48 31-C9 E8 04 00-73 1E F7 D8 ...s'HH1....s...
1639:01D0 57 49 41 01-C7 39 1D 74-F9 80 F9 03-72 0D 29 C7 WIA..9.t....r.).
1639:01E0 80 4D 01 80-29 C7 39 1D-74 F6 F8 5F-C3 50 51 B1 .M..).9.t.._.PQ.
1639:01F0 07 B8 20-02 F2 AB 59-58 C3 41 67-61 69 6E 3F .. ...YX.Again?
-> q

--
Bah, and indeed Humbug.

Kerr-Mudd, John

unread,
Feb 14, 2024, 8:58:21 AMFeb 14
to
Urgh!, it's limited to 9 wins for yellow!

-> d 100 l100
16B3:0100 B7 B8 8E C3-8E DB CD 10-B1 06 BF EC-02 B8 5F 77 .............._w
16B3:0110 AB E8 D8 00-AB 83 C7 3E-E2 F6 B1 09-F3 AB BF 1E .......>........
16B3:0120 05 E8 C8 00-BA 2A 00 BD-23 0C BB 4F-0E 87 EB BF .....*..#..O....
16B3:0130 A4 02 89 1D-B4 00 CD 16-C7 05 20 02-3C 1B 74 3E .......... .<.t>
16B3:0140 3C 0D 75 3B-E8 4E 00 74-E9 72 E2 88-F8 98 B1 03 <.u;.N.t.r......
16B3:0150 D3 E0 05 EE-01 97 88 FC-4F 4F B0 30-87 05 0C 30 ........OO.0...0
16B3:0160 40 3C 3A 74-F3 88 05 B1-06 BE F8 01-BF 1E 05 2E @<:t............
16B3:0170 AC AA 47 E2-FA 98 CD 16-24 DF 3C 59-74 8A C3 86 ..G.....$.<Yt...
16B3:0180 C4 2C 4B 24-02 48 D1 E0-01 F8 3C 9E-72 A4 3C AA .,K$.H....<.r.<.
16B3:0190 77 A0 97 EB-9D 89 F8 83-C7 50 80 3D-20 74 F8 83 w........P.= t..
16B3:01A0 EF 50 29 F8-74 D8 89 1D-4A 75 03 58-EB B9 B8 02 .P).t...Ju.X....
16B3:01B0 00 E8 12 00-73 35 B0 B2-E8 0B 00 73-2E 40 40 E8 ....s5.....s.@@.
16B3:01C0 04 00 73 27-48 48 31 C9-E8 04 00 73-1E F7 D8 57 ..s'HH1....s...W
16B3:01D0 49 41 01 C7-39 1D 74 F9-80 F9 03 72-0D 29 C7 80 IA..9.t....r.)..
16B3:01E0 4D 01 80 29-C7 39 1D 74-F6 F8 5F C3-50 51 B1 07 M..).9.t.._.PQ..
16B3:01F0 B8 20 02 F2-AB 59 58 C3-41 67 61 69-6E 3F 00 00 . ...YX.Again?..

Same code, only ScoreLine moved up 1 to avoid the current player's
piece interfering.

Kerr-Mudd, John

unread,
Feb 19, 2024, 5:47:08 AMFeb 19
to
On Wed, 14 Feb 2024 13:51:23 +0000
"Kerr-Mudd, John" <ad...@nospicedham.127.0.0.1> wrote:

> On Tue, 13 Feb 2024 19:53:32 +0000
> "Kerr-Mudd, John" <ad...@nospicedham.127.0.0.1> wrote:
>
> > Been a while, and the thread has expired from my usenet list, but here is
> > a tweaked version - it now hilites the /whole/ row when a win is
> > detected.
> > Two player game, no AI (sorry).
> > Cursor L/R to move current player's piece, Enter to drop. (Esc to quit).
> > Number of wins at top left & top right above 'board'
> > Uses Bios int10 for screen & int16 for keyboard.
> > Assumes ax=0 at start to change to 40x25 text mode.
> >
Smaller, allows space & Enter (and any ASCII key!) to drop
Must use Csr keys to move L/R.

Fixed a bug that meant a draw would have been seen before a last
placement win. "Again" message uses colour of last placed char (usually
winner), and put on the base bar.

> > grdb dump:
> >
-> d 100 lED
16AD:0100 B7 B8 8E C3-8E DB CD 10-B8 5F 77 BA-20 02 B1 06 ........._w. ...
16AD:0110 BF EC 02 AB-92 51 B1 07-F3 AB 59 92-AB 83 C7 3E .....Q....Y....>
16AD:0120 E2 F1 B1 09-F3 AB BA 2B-00 BD 23 0C-BB 4F 0E 4A .......+..#..O.J
16AD:0130 74 3A 87 EB-BF A4 02 89-1D B4 00 CD-16 C7 05 20 t:.............
16AD:0140 02 3C 1B 74-3C 3C 00 74-39 E8 4C 00-74 E9 72 DF .<.t<<.t9.L.t.r.
16AD:0150 88 F8 98 B1-03 D3 E0 05-EE 01 97 88-FC 4F 4F B0 .............OO.
16AD:0160 30 87 05 0C-30 40 3C 3A-74 F3 88 05-B1 06 BE E7 0...0@<:t.......
16AD:0170 01 BF CE 04-93 2E AC AB-E2 FB 98 CD-16 24 86 74 .............$.t
16AD:0180 87 C3 86 C4-2C 4B 24 02-48 D1 E0 01-F8 3C 9E 72 ....,K$.H....<.r
16AD:0190 A6 3C AA 77-A2 97 EB 9F-89 FE 83 C7-50 80 3D 20 .<.w........P.=
16AD:01A0 74 F8 83 EF-50 39 FE 74-D8 89 1D B1-02 E8 12 00 t...P9.t........
16AD:01B0 73 34 B1 B2-E8 0B 00 73-2D 41 41 E8-04 00 73 26 s4.....s-AA...s&
16AD:01C0 49 49 B0 00-E8 04 00 73-1D F7 D9 57-48 40 01 CF II.....s...WH@..
16AD:01D0 39 1D 74 F9-3C 03 72 0D-29 CF 80 4D-01 80 29 CF 9.t.<.r.)..M..).
16AD:01E0 39 1D-74 F6 F8 5F-C3 41 67 61-69 6E 3F 9.t.._.Again?
-> q
0 new messages