Commodore 128 Alive!

Commodore 128 => Software => CP/M => Topic started by: LokalHorst on June 08, 2010, 06:27 AM

Title: Easter Egg in CP/M mode (Z80 Rom)
Post by: LokalHorst on June 08, 2010, 06:27 AM
Most of the old-schoolers know the following:

SYS 32800,123,45,6

... but while disassembling the Z80 rom I found a similar one available in CP/M too.
You can activate it with the following key sequence
(position cursor @ line 24 col 24 and do insert line):

<ESC>=88<ESC>e

looks like this:

(http://lookpic.com/d2/t2/2968/3L5y6Xwk.gif) (http://lookpic.com/d2/i2/2968/3L5y6Xwk.gif)

the activation is hidden in the insert-line Rom-Bios function:


A052C:    ;FN 54 -print string (scrambled)
LD   HL,0FFFF
LD   (Y2404),HL
A0532:    ;FN 53 -print string DE=string adr
PUSH DE
A0533:
POP  HL
A0534:
LD   D,(HL)
INC  HL
LD   A,(Y2405)
AND  A
JR   Z,A0541
XOR  D
LD   (Y2405),A
LD   D,A
A0541:
LD   A,D
OR   A            ;chr 0 ?
RET  Z            ;yes, string end
CP   '$'          ;chr 36 ?
RET  Z            ;yes, string end
PUSH HL
LD   HL,A0533     ;continue adr.
PUSH HL
CP   00A          ;line feed
RET  Z            ;yes, get next chr
A054F:
CP   00D          ;return code
JR   NZ,A055E     ;skip if not
CALL A0A45        ;move to next line
CALL A06F1        ;40col
CALL A09F1
RST  018          ;80col
DB 00C            ;fn 6
;
...

A07DC:    ;FN 22 -insert line 80col
LD   DE,T0F62     ;addr. of the xor encrypted msg.
LD   A,017    ;cmp value 23d
LD   HL,(Y2413)
CP   H    ;line # in H
JP   Z,A0705
JR   C,A0804    ;skip if greater than 23d
LD   HL,006E0
LD   DE,00730
LD   B,018
A07F2:
CALL A080A
LD   A,(Y2414)
CP   B
JR   NZ,A07F2
CALL A0CC7
EX   DE,HL
LD   BC,00050
JR   A0841
;
A0804:
INC  A    ;A = 24d
CP   L    ;cmp. to col # in L
RET  NZ
JP   A052C    ;if equal jmp to $052c -> FN 54
...
;             scrambled text of soft- & hardware prod. team
T0F62:
DB 000,0F2,05B,039,001,04E,065,037,006,003,01E,007,00B,068,04B,034
DB 017,001,044,062,02D,018,012,00B,063,059,031,017,000,00B,059,072
DB 02B,018,00F,063,000,04F,02B,005,04C,068,02D,017,016,069,049,025
DB 017,013,045,068,029,018,017,007,00C,068,04B,034,013,00F,005,04B
DB 070,031,00D,00D,008,008,06C,00D
;

Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: RobertB on June 08, 2010, 10:50 AM
     I never knew about that in CP/m mode.  :)

         Truly,
         Robert Bernardo
         Fresno Commodore User Group
         http://videocam.net.au/fcug (http://videocam.net.au/fcug)
         July 24-25 Commodore Vegas Expo v6 -
         http://www.portcommodore.com/commvex (http://www.portcommodore.com/commvex)
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: Hydrophilic on June 09, 2010, 04:35 PM
Good work LokalHorst (http://www.commodore128.org/index.php?action=profile;u=1022).  I saw that in the ROM a while back, but never could figure out how to activate it (short of writing a program to call the appropriate Z80 BIOS function).  I knew there had to be a way to activate it through the keyboard interface, but never could figure it out.  Well, that's one less worry on mind.  Thanks!
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: Gumpy on June 11, 2010, 12:18 AM
Wow, neat.  ;D
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: wte on June 11, 2010, 09:07 AM
Really amazing!

Regards WTE

PS: I made a "copy (http://blog.c128.net/archives/477)" for the German guys.
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: LokalHorst on June 28, 2010, 09:33 PM
Thanks WTE for putting it to your blog - it's funny because I'm german too.

I have to add that this was discovered already somewhere in the early 90's (can't remember exactly) while discovering the least used mode on the '128, but never published anywhere.
While clearing up the basement I stumbled over the boxes with the 8bit stuff, and the interest in it flamed up again (those where the times when 'blue screen' had a different meaning). I'm a bit ashamed that most of the things I did with this machine weren't documented by myself (pure lazyness) and I have to do it all over again.
During the mid 80's to early 90's I serviced Commodore & other pre-PC homecomputer stuff, than later most of my collection was given away or sold (or got lost during a move).
I currently have a modded c128flat, 2 x 1571, a 1581 replica (selfbuild, can attach any shugart-bus compatible drive), a exp. port memory card (selfbuild), but no cbm compatible monitor to hook up - so limited to vice x128 currently (myz80 for cp/m)
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: wte on June 29, 2010, 09:12 AM
Hi!

As a German you should take a look on Forum64: http://www.forum64.de/
There you will also find some places in the real world to meet commodore users. E.g. Frankfurt area (HomeCon), Ruhrgebiet (DoReCo), Stuttgart (Hobby & Elektronik) or end of next week in Bochum (Bunkerparty).

Regards / Grüße WTE
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: BigDumbDinosaur on June 29, 2010, 10:01 AM
Seeing all that reminds me why I never liked the Z80.  It has a really ugly assembly language.  :)
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: RobertB on June 29, 2010, 01:20 PM
Quote from: wte on June 29, 2010, 09:12 AM
...end of next week in Bochum (Bunkerparty).
Ah, Bochum.  Give my regards to Dirk at the party.

            Next year, back in Germany,
            Robert Bernardo
            Fresno Commodore User Group
            http://videocam.net.au/fcug (http://videocam.net.au/fcug)
            July 24-25 Commodore Vegas Expo v6 - http://www.portcommodore.com/commvex (http://www.portcommodore.com/commvex)
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: wte on July 01, 2010, 08:22 AM
Quote from: RobertB on June 29, 2010, 01:20 PM
Ah, Bochum.  Give my regards to Dirk at the party.
I will do so.
Dirk is the organizer and I intend to spend three nerdy days in the bunker  ;D

Regards WTE

Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: RobertB on July 01, 2010, 03:52 PM
Quote from: wte on July 01, 2010, 08:22 AM...I intend to spend three nerdy days in the bunker  ;D
Well, I don't know if I would be able to spend 3 days in the bunker... maybe one night.  ;)  For those who don't know what I'm talking about, look at the photos at

           http://www.dickestel.com/commgermany.htm (http://www.dickestel.com/commgermany.htm)

                 Last night in Seattle, Washington,
                 Robert Bernardo
                 Fresno Commodore User Group
                 http://videocam.net.au/fcug (http://videocam.net.au/fcug)
                 July 24-25 Commodore Vegas Expo v6 - http://www.portcommodore.com/commvex (http://www.portcommodore.com/commvex)
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: wte on July 03, 2010, 08:28 AM
Quote from: RobertB on July 01, 2010, 03:52 PMWell, I don't know if I would be able to spend 3 days in the bunker... maybe one night.  ;)
At the moment we have a heat-wave in Germany. Maybe it is a little bit colder in the bunker than at home  ;D
If the worst comes to the worst it will be hot and stuffy - than we have to sleep on the roof  :o
Title: Re: Easter Egg in CP/M mode (Z80 Rom)
Post by: RobertB on July 03, 2010, 07:14 PM
Quote from: wte on July 03, 2010, 08:28 AMMaybe it is a little bit colder in the bunker than at home  ;D
Well, it should be colder in there.  :)  Until all that concrete absorbs all the heat...
Quote...than we have to sleep on the roof  :o
I've nearly done that at Dirk's place.  ;)

            Back in California,
            Robert Bernardo
            Fresno Commodore User Group
            http://videocam.net.au/fcug (http://videocam.net.au/fcug)
            July 24-25 Commodore Vegas Expo 2010 - http://www.portcommodore.com/commvex (http://www.portcommodore.com/commvex)
EhPortal 1.34 © 2025, WebDev