Jump to content
IGNORED

A few bees and tomatoes of the killer variety


decle

Recommended Posts

I've been fortunate in that several versions of "Killer Bees" and its derivatives have come my way and this post is a look at that small collection.  The original Killer Bees was written by David Rolfe as a demonstration for Mattel to show how little code was required by the EXEC to get some semblance of a game up and running.  Subsequently, Killer Bees was used by both APh and Mattel as a tool to introduce new recruits to developing for the Intellivision.  Inductees were provided with the Killer Bees source code and asked to enhance it as a means of understanding how to develop games using the framework provided by the EXEC.  As a consequence, there were many derivatives of Killer Bees, most of which have been lost.  However, it turns out there are still quite a few knocking about.

 

This thread is going to describe each of the variants.  Where possible, as well as a short video and description of the variant, I will include a binary that can be played on an emulator and the original source code.  It should be noted that it's not possible to use the development tools in JzIntv to rebuild the binaries from the source as the assembly language used by APh is different to (some of the original developers would say better than) that used by modern tools.

 

With that said, let's dive in.


KILLER BEES - David Rolfe - 01BeesRolfe.zip

This is believed to be the original version of Killer Bees, written by Talkin Horse Inc (aka David Rolfe) in 1978.  The "game" comprises a Running Man from Baseball who is stung if he carelessly walks into a static swarm of bees (referred to as a Mine in the source code).  When stung, the man changes from blue to tan.  After 6 seconds the man becomes unstung and reverts to blue.  From the source it seems David intended this to happen after 2 seconds, however, because the EXEC ticks every 20th of a second rather than every 60th, this actually takes three times longer than expected.  The only sound in Killer Bees are the key clicks sounds generated by the EXEC as it processes controller inputs.  David published the source code to this version on his personal website in 1999.

 

KILLER BEES - Mattel - 02BeesMattel.zip

This version of Killer Bees has been retrieved from the Technology Associates PDP-11 disk archive.  The other contents of the disk suggest that this version was received from Mattel rather than APh.  It's clearly quite an early variant with a file date of April 1979.  This version converts the Mine into an animated bees swarm of bees that chase the player.  "Ouch!"  is written to the screen when the player is stung, and the player's avatar moves faster than David Rolfe's original.


KILLER TOMATOES! - 03Tomatoes.zip

Based on comments in the code, it appears that David Rolfe's original Killer Bees was tidied up by John Sohl on his return to Mattel having been seconded to work on Astrosmash at APh's offices in the fall of 1980.  John reworked Trivia / Killer Bees renaming it "Killer (Trivia II)" in the process.  Perhaps this is when it acquired the name Killer Tomatoes!?  Killer Tomatoes! is attributed to TRIVIA PRODUCTIONS and appears to be similar to David's original.  The Mine has been changed to flash red and yellow, but otherwise the gameplay is the same.  However, the comments in the source code have been extended quite a bit with references to Your Friend the EXEC.


MAN DIVES! - 04ManDives.zip

Attributed to "ONE MUSKETEER", Man Dives! was posted to Atari Age by Steve Roney and seems to be closely related to Killer Tomatoes!  The source code is very similar and, other than the black background, the only significant change in game play is to replace the Baseball Running Man with a Football derived Running Man.  Whilst the title suggests he is supposed to be diving as he moves, it looks more like he is repeatedly falling and picking himself up to me.


SOUNDT / SOUND TESTER #2 - 05SoundTester2.zip

Sound Tester or SOUNDT was originally written by Bill Goodrich in 1982.  It is a Killer Tomatoes! derivative designed to test sound effects and a pre-cursor to Mr Sound! written by Daniel Bass.  This version dates from the end of February and was recovered from the Technology Associates PDP-11 archive.  It would seem that SOUNDT allows the definition and testing of two sound effects, which are stored in RAM. The sounds are activated using the bottom action buttons, and it is believed that the sounds can be defined using the controller keypads.  Unfortunately this version of the code is incomplete and the missing functions mean that sounds cannot be altered.  The binary included here has been built with calls to these functions commented out.  No sounds are built into SOUNDT, so a macro in the configuration file will load two simple sound effects into RAM, allowing the program's playback behaviour to be demonstrated.  Looking at the actual Killer Bees game within SOUNDT, the mine/bees are not enabled, and so your Baseball Running Man has the freedom of the screen.


WAY TO GO, JOE - 06WayToGoJoe.zip

Way To Go, Joe (WTGJ) is a derivative of the "Mattel" version of Killer Bees, complete with animated swarm that chases your Running Man.  WTGJ was written by Joe Jacobs in August 1981 and this version was found within the Technology Associates PDP-11 archive under the name JOE.ASM.  The major enhancement made by WTGJ is the addition of sound effects taken from Math Fun and SNAFU.  These play periodically as the bees move, and also pretty insistently whenever the Running Man is stung.  In addition, Joe has increased the running speed of your protagonist and cut some of his run animation, giving him a rather stuttery gait.  When you run off the screen edge, your avatar now reappears at the centre.  Finally, the bees have been changed to be red, rather than the yellow of Killer Bees.


DEBUG KILLER TOMATOES! - 07DebugTomatoes.zip

Debug Killer Tomatoes! has version 2.0 of Rick Koenig's Intellivision debugger embedded within it.  The source code is contained in three files dated between May and June 1983.  These files were supplied by Mattel to Technology Associates in June 1983 along with a Magus test harness to help Joe and Dennis to debug Bump N Jump.  In addition to the code itself, we also have instructions for the use of the debugger in the file BUG.TXT.  This version of the debugger is a precursor to the one found in World Championship Baseball as it does not provide the disassembly of the current instruction and has slightly different controls. In terms of Killer Tomatoes!, in order to play the game it is necessary to "Fast Run" the debugger using the 0 key on the right hand keypad.  At this point it becomes clear that in addition to the Mine, which rapidly flashes red and white, there are two black, inverted A characters printed on the screen.  The Running Man, who positively sprints round the screen, can also be stung by these.  To return to the debugger press the lower right hand action button on the left controller.


CRAZY CLONES '81 - 08CrazyClones81.zip

This is the original and unfinished version of Crazy Clones released on Intellivision Lives!  For obvious reasons this version of the binary is not included. No source code has currently been found for this version, however, using the source for Crazy Clones '83 it has been possible to rebuild a plausible set of files.  These illustrate how the '83 version builds on this variant.  Interestingly, the final four functions in the code (listed in UNKNOWN.ASM) aren't found in the '83 version of Crazy Clones.  They have been reverse engineered from the binary.  None of these functions actually seem to be used by the game.  This can be demonstrated by crazyClonesMinimal.bin which is built without them.  Most of the redundant code seems to have been taken from Melody Blaster, one of the Tron titles and Astrosmash.  Presumably this redundant code was removed during the construction Crazy Clones '83 (below), hence why it is missing.  In this version of Killer Bees the your Running Man must catch clones. Doing so kills them and scores 10 points.  The "Mine" chases you around the screen in a similar manner to the bee swarm and will kill you, ending the game if it touches you.


CRAZY CLONES '83 - 09CrazyClones83.zip

This is a second and much more complete version of Crazy Clones, which according to the title screen dates from 1983.  The source code for it was provided by Steve Roney.  It is believed that this version was the work of Keith Robinson, or someone who was working with him.  This is evidenced by the Tron Solar Sailer font used on the title screen and a comments in the source code.  The source code supplied was incomplete, but the missing functions have been reverse engineered allowing the full game to be rebuilt.  Whilst the game is a variant of Killer Bees, a sophisticated title screen and group play mechanic have been added using code from Solar Sailer and Party Line.  It is speculated that this variant was being worked on as a potential Party Line title.  It is not known why Keith released the simplified 1981 version of Crazy Clones on Intellivision Lives!, rather than this more interesting version.


If you've gotten here, thanks.  If you want more, I've added a summary of the various versions of Killer Bees to the latest version of the Intellivision Development Description along with some other new information on Roklan development.

  • Like 11
  • Thanks 5
Link to comment
Share on other sites

  • 4 months later...
On 9/19/2023 at 7:08 PM, decle said:

This is believed to be the original version of Killer Bees, written by Talkin Horse Inc (aka David Rolfe) in 1978.

Not the original original: a version was available at the beginning of the summer of 1978; the EXEC's title screen functionality seen in this version wasn't added until toward the end of that summer, after all of the games had pretty much come together.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

The "game" comprises a Running Man from Baseball who is stung if he carelessly walks into a static swarm of bees (referred to as a Mine in the source code).

Which suggests that the original idea of "TRIVIA" was simply to demonstrate a man walking into a mine, and the idea of turning the mine into a swarm of bees was a later enhancement. The name "TRIVIA" is a shortening of "trivial," required because the filesystems of the day limited filenames to 6 Radix-50 characters to conserve space.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

From the source it seems David intended this to happen after 2 seconds, however, because the EXEC ticks every 20th of a second rather than every 60th, this actually takes three times longer than expected.

Rolfe wasn't quite that obtuse. APh's original plan, even before Rolfe was assigned to the project, was of course to run the EXEC on a 60 second clock. It was not until Rolfe was into implementation that one of APh's hardware guys was called over to investigate why STIC time wasn't accommodating the expected number of instructions (STIC time being the time during vertical retrace that the STIC registers were accessible to the CPU) and discovered that the emulator was only clocking the CPU at 1.8 MHz. That is 36% of the CPU's officially rated speed of 5 MHz. That discovery has been described as soul-crushing. So I conclude, and I have no authority for this, that the comment of Rolfe's to which you refer to was written early in the development cycle and not updated to reflect changes he subsequently had to make to the EXEC. It happens.

In any case, I expect that Rolfe wanted the running man to change color for about six seconds after touching the mine. Two seconds would have been too short. He would surely have noticed the difference when he ran the program.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

This version of Killer Bees has been retrieved from the Technology Associates PDP-11 disk archive.

It may have been retrieved from Technology Associate's archive, but Technology Associates did not exist in April 1979. The file was sent to Dennis Clark at GI's Jerrold Division to support the development of PlayCable.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

Based on comments in the code, it appears that David Rolfe's original Killer Bees was tidied up by John Sohl on his return to Mattel having been seconded to work on Astrosmash at APh's offices in the fall of 1980.

The code itself doesn't appear to me to have been tidied up: the only change in the instructions was changing the polarity of the GRAM images and removing two code segments that Rolfe had commented out—these appear to have been intentionally left in place by Rolfe because they were illustrative. The comments were indeed beefed up as you described, and the program did have the extra process that blinked the mine, but I suspect that latter feature predates Sohl.

I found it interesting that Rolfe used TRIVIA to give all of the new programmers a quick lesson in program counter arithmetic. Some of the programmers on this site may find it instructive even today. The code segment below is Rolfe's, the comments are mine. Remember that R7 is the program counter:

; ROUTINE IS INVOKED WITH DIRECTION IN R2

;   0=RIGHT 1=LEFT 2=BOTTOM 3=TOP

;   (REMEMBER, R7 IS THE CP1600's PROGRAM COUNTER)

CENTER: BEGIN  

        SLL     R2,1           ;DOUBLE VALUE IN R2 (BECAUSE BRA IS A 2-WORD INSTR.)

        ADD     R2,R7          ;ADDING R2 TO R7 CAUSES JUMP INTO STRING OF BRANCHES

        BRA     OFFRIT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 0

        BRA     OFFLFT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 1

        BRA     OFFBOT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 2

;       BRA     OFFTOP         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 3

OFFTOP: MOV     #FOREY,R0      ;  (PREV LINE COMMENTED OUT, SO REALLY GET HERE)

        SWAP    R0

        INC     R7             ;INCREMENTING R7 SKIPS NEXT INSTR W/ONE DECLE

OFFBOT: CLR     R0

        MOV     R0,MAN+.OBJY

        RETURN

OFFLFT: MOV     #FOREX,R0

        SWAP    R0

        INC     R7             ;INCREMENTING R7 SKIPS NEXT INSTR W/ONE DECLE

OFFRIT: CLR     R0

        MOV     R0,MAN+.OBJX

        RETURN

The string of BRA instructions serves as a dispatch table. Note that the last entry in the dispatch table is commented out and that as a result the "computed GO TO" for the case R2=3 goes directly to OFFTOP, saving another two decles. Optimizations like this were important, as saving even 40 decles constituted saving a full one percent of the total memory available to the first cartridges. Yowks!

WJI

  • Like 1
Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

No source code has currently been found for this version, however, using the source for Crazy Clones '83 it has been possible to rebuild a plausible set of files.

Nicely done. Done with care and presented with quiet confidence, as usual.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

The other contents of the disk suggest that this version was received from Mattel rather than APh.

The file was created by APh, as there were at that time no software development systems at Mattel. That particular file may well have been routed through Mattel (for example, it may have been handed to Dougherty, who at the time was one of Chandler's grips who was often at APh), but in general APh was giving Jerrold direct support. Without other evidence, you should not presume that all of the files on any particular disk were sent to Jerrold at the same time.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

Whilst the title suggests he is supposed to be diving as he moves, it looks more like he is repeatedly falling and picking himself up to me.

It's unfair to suggest a Trivia/Killer game is less than perfect. The Trivia/Killer games were throw-aways—they weren't supposed to be polished. They were "Hello world!" programs before "Hello World!" existed. You were given two weeks to play around, then moved on to a real game. I'd cringe if all of the drafts of papers I wrote in my youth were thrown open for public inspection.

That being said, this particular program probably wasn't a training exercise. The author was probably just using KILLER.ASM as a test bed for testing out an animation sequence.

WJI

Link to comment
Share on other sites

On 9/19/2023 at 7:08 PM, decle said:

Way To Go, Joe (WTGJ) is a derivative of the "Mattel" version of Killer Bees, complete with animated swarm that chases your Running Man.

Right, except that what you call the "Mattel" version was almost written at APh, probably by Rolfe. WTGJ is pretty feature-light compared to TRIVIA/KILLER programs written as introductory exercises at APh and Mattel. Jacobs was not working under Minkoff or Daglow's direct supervision and were probably anxious to get started on the real game as soon as possible.

WJI

Link to comment
Share on other sites

18 hours ago, Walter Ives said:

 

The code itself doesn't appear to me to have been tidied up: the only change in the instructions was changing the polarity of the GRAM images and removing two code segments that Rolfe had commented out—these appear to have been intentionally left in place by Rolfe because they were illustrative. The comments were indeed beefed up as you described, and the program did have the extra process that blinked the mine, but I suspect that latter feature predates Sohl.

I found it interesting that Rolfe used TRIVIA to give all of the new programmers a quick lesson in program counter arithmetic. Some of the programmers on this site may find it instructive even today. The code segment below is Rolfe's, the comments are mine. Remember that R7 is the program counter:

; ROUTINE IS INVOKED WITH DIRECTION IN R2

;   0=RIGHT 1=LEFT 2=BOTTOM 3=TOP

;   (REMEMBER, R7 IS THE CP1600's PROGRAM COUNTER)

CENTER: BEGIN  

        SLL     R2,1           ;DOUBLE VALUE IN R2 (BECAUSE BRA IS A 2-WORD INSTR.)

        ADD     R2,R7          ;ADDING R2 TO R7 CAUSES JUMP INTO STRING OF BRANCHES

        BRA     OFFRIT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 0

        BRA     OFFLFT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 1

        BRA     OFFBOT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 2

;       BRA     OFFTOP         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 3

OFFTOP: MOV     #FOREY,R0      ;  (PREV LINE COMMENTED OUT, SO REALLY GET HERE)

        SWAP    R0

        INC     R7             ;INCREMENTING R7 SKIPS NEXT INSTR W/ONE DECLE

OFFBOT: CLR     R0

        MOV     R0,MAN+.OBJY

        RETURN

OFFLFT: MOV     #FOREX,R0

        SWAP    R0

        INC     R7             ;INCREMENTING R7 SKIPS NEXT INSTR W/ONE DECLE

OFFRIT: CLR     R0

        MOV     R0,MAN+.OBJX

        RETURN

The string of BRA instructions serves as a dispatch table. Note that the last entry in the dispatch table is commented out and that as a result the "computed GO TO" for the case R2=3 goes directly to OFFTOP, saving another two decles. Optimizations like this were important, as saving even 40 decles constituted saving a full one percent of the total memory available to the first cartridges. Yowks!

WJI

 

It looks like the kind of techniques we still use today (well, at least those of us who programme in Assembly Language).  The only thing I would do differently -- at least in some situations -- would be to use "DECLE $0208" instead of "INCR  R7" -- this has two useful side effects:

  • It converts the next single-word instruction into an effective NOPP*, allowing it to skip the operation with a single decle;
  • It avoids altering the CPU status flags (which INCR will wantonly do).

 

*The NOPP instruction is a curious animal.  Its op-code seems to exist merely as a diametrical opposite to "B" ("branch always unconditionally").  (By the way, all branching instructions have an opposite, e.g. BZE (Branch on Zero) vs. BNZ (Branch on Not-Zero), etc.  It turns out even the unconditional branch "B" has one, so as opposed to "branch always," it means "branch never.")

 

Like all other branch instructions, NOPP is encoded in two words:  the first indicates the branch type and condition, and the second indicates the target address.  However, since this instruction does absolutely no branching, the latter is ignored.  As a consequence, it acts effectively as a NOP (or No-OPeration) -- i.e., it quite literally performs a "GOTO" that goes nowhere.

 

The first word in the NOPP op-code is $0208, which encodes its type.  Injecting this into your code will automagically turn the following instruction into the second word of the NOPP -- and thus causing it to be ignored!  Whoa!

 

There is a third side-effect of this trick I forgot to mention:

  • Like any other branch instruction, it costs 9 CPU cycles rather than the 6 of INCR.  (Even though it doesn't go anywhere, it is still treated as a "GOTO.")

 

So, its a trade-off between speed, space, and persistence of the CPU status flags -- the latter may or may not be important, but when you're doing the sort of bit-twiddling tricks as above to save space and cycles, it is useful to have options. :)

 

     -dZ.

  • Like 2
Link to comment
Share on other sites

19 hours ago, Walter Ives said:

 

; ROUTINE IS INVOKED WITH DIRECTION IN R2

 

;   0=RIGHT 1=LEFT 2=BOTTOM 3=TOP

;   (REMEMBER, R7 IS THE CP1600's PROGRAM COUNTER)

CENTER: BEGIN  

        SLL     R2,1           ;DOUBLE VALUE IN R2 (BECAUSE BRA IS A 2-WORD INSTR.)

        ADD     R2,R7          ;ADDING R2 TO R7 CAUSES JUMP INTO STRING OF BRANCHES

        BRA     OFFRIT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 0

        BRA     OFFLFT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 1

        BRA     OFFBOT         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 2

;       BRA     OFFTOP         ;  JUMP TO HERE IF R2 WAS ORIGINALLY 3

OFFTOP: MOV     #FOREY,R0      ;  (PREV LINE COMMENTED OUT, SO REALLY GET HERE)

        SWAP    R0

        INC     R7             ;INCREMENTING R7 SKIPS NEXT INSTR W/ONE DECLE

OFFBOT: CLR     R0

        MOV     R0,MAN+.OBJY

        RETURN

OFFLFT: MOV     #FOREX,R0

        SWAP    R0

        INC     R7             ;INCREMENTING R7 SKIPS NEXT INSTR W/ONE DECLE

OFFRIT: CLR     R0

        MOV     R0,MAN+.OBJX

        RETURN

 

Another thing I probably would do differently is to use an actual dispatch table rather than direct branches.  See below for an example  (Some mnemonics may appear different due to assembler idiosyncracies)

            ADDI    #@@__tbl, R2    ; Compose address using R2 as index
            MVI@    R2,     R7      ; Jump to table entry
@@__tbl:    DECLE   OFFRIT
            DECLE   OFFLFT
            DECLE   OFFBOT
            DECLE   OFFTOP

 

This version does not have the neat "fall-through" trick of the "OFFTOP" branch above, but it does have a few things going for it:

  • The entries in the table are a single word each, while the "BRA" entries take two each.
  • It requires a single jump after composing the dispatch table entry address, rather than the two incurred by jumping to the dispatch table, then jumping to the target block.

It does have one drawback that the original does not have:

  • The value of R2 is destroyed in the process.

So, if you need to persist it, then your options are to

  • Use another register for the dispatch (consumes another register and requires an extra operation, making it more expensive)
  • Save it in the stack (very expensive!)

However, if your concern is mostly on conserving ROM space (as it was to Rolfe), then any of those would be superior to the requisite 2-words per dispatch entry of the original, since they take at most one more word.

 

And ... just because I am bored this morning, here's another optimization the original code could use:  avoid using "BEGIN/END" pairs which save and restore the return address in the stack.  This is not only very costly in CPU cycles, but requires one word for each operation (so, three in the code above:  1x BEGIN, 2x RETURN). *

 

Because the return address (typically in R5) does not seem to be touched in the code above, there is no need to save it in the stack.  You are better off just using a "Jump to address in Register" (JR) instruction upon return, and avoid saving it at all.  That still uses one word for each return (2x), saving you one; plus it saves a slot in the stack (which could be precious) and the cost incurred by saving to, and restoring from it.

 

* Of course, this is assuming that the BEGIN/RETURN in Rolfe's code does the same as the BEGIN/RETURN in our modern assembler:

	BEGIN		; MVO@ R5, R6

	; ...

	RETURN		; MVI@ R6, R7

 

In any case, like Mr. Ives I also find very interesting that Mr. Rolfe takes the opportunity to include such advanced techniques in what is intended to be a "hello world" training program.  I imagine that it allows newcomers to start getting their head around the fact that space is at a premium, and that they must focus primarily on coding offensively to preserve it.

 

     -dZ.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
On 2/18/2024 at 12:19 PM, DZ-Jay said:

There is a third side-effect of this trick I forgot to mention:

  • Like any other branch instruction, it costs 9 CPU cycles rather than the 6 of INCR.  (Even though it doesn't go anywhere, it is still treated as a "GOTO.")

Your solution is better than you think: it only costs 7 CPU cycles. The inelegant DECLE statement can be hidden inside a pretty little library SKIP macro (which you undoubtedly do).

 

WJI

  • Like 1
Link to comment
Share on other sites

On 2/19/2024 at 3:36 AM, DZ-Jay said:

* Of course, this is assuming that the BEGIN/RETURN in Rolfe's code does the same as the BEGIN/RETURN in our modern assembler:

	BEGIN		; MVO@ R5, R6

	; ...

	RETURN		; MVI@ R6, R7

 

Pretty sure the MACROS library Rolfe used defined BEGIN as "PUSH R5" and RETURN as "POP R7", both of which were recognized by the assembler. From the assembler manual:

J.4SpecialMnemonics.png.cb7fd0b22f3514d1173e2aaf52eb58ba.png

 

It helps to have people on staff to add nifty features to your assembler. Eat your heart out.

 

WJI

 

Link to comment
Share on other sites

On 2/19/2024 at 3:36 AM, DZ-Jay said:

It does have one drawback that the original does not have:

  • The value of R2 is destroyed in the process.

...

However, if your concern is mostly on conserving ROM space (as it was to Rolfe), then any of those would be superior to the requisite 2-words per dispatch entry of the original, since they take at most one more word.

In Rolfe's version R2 was already impacted by the shift, although in a pinch its value could be recovered with one instruction. Your ADDI, however, would have been a four-decle SDBD monstrosity for those poor unfortunate souls constrained by 10-bit ROMs. Point to Rolfe.

 

WJI

Link to comment
Share on other sites

On 2/19/2024 at 3:36 AM, DZ-Jay said:

In any case, like Mr. Ives I also find very interesting that Mr. Rolfe takes the opportunity to include such advanced techniques in what is intended to be a "hello world" training program.  I imagine that it allows newcomers to start getting their head around the fact that space is at a premium, and that they must focus primarily on coding offensively to preserve it.

Plus it's just plain fun to show off a little PC arithmetic.

 

WJI

 

Link to comment
Share on other sites

2 hours ago, Walter Ives said:

Your solution is better than you think: it only costs 7 CPU cycles. The inelegant DECLE statement can be hidden inside a pretty little library SKIP macro (which you undoubtedly do).

 

WJI


Indeed, I do. :)

 

2 hours ago, Walter Ives said:

Pretty sure the MACROS library Rolfe used defined BEGIN as "PUSH R5" and RETURN as "POP R7", both of which were recognized by the assembler. From the assembler manual:

J.4SpecialMnemonics.png.cb7fd0b22f3514d1173e2aaf52eb58ba.png

 

It helps to have people on staff to add nifty features to your assembler. Eat your heart out.

 

WJI

 


Well, that's what I get for trying to be clear in using actual opcodes.  Yes, of course, we also have those assembler synonyms: but our assembler calls them PSHR (Push register) and PULR (Pull register).  I just wasn't sure if BEGIN/RETURN meant the same thing as in the modern assembler.  It turns out it does.

 

By the way, I didn't come up with those terms.  Personally, I prefer PUSH and POP, so points to GI. :)

 

2 hours ago, Walter Ives said:

In Rolfe's version R2 was already impacted by the shift, although in a pinch its value could be recovered with one instruction. Your ADDI, however, would have been a four-decle SDBD monstrosity for those poor unfortunate souls constrained by 10-bit ROMs. Point to Rolfe.

 

WJI


Ouch!  So true.  Us yung'ns have no conception of working with 10-bit ROM, but somehow I can't help but feel smug about that privilege. :P

 

(Sorry, all in good fun.  My highest respect to Mr. Rolfe.  I know he could code circles around me with his hands closed and his eyes tied behind his back.  :))

 

2 hours ago, Walter Ives said:

Plus it's just plain fun to show off a little PC arithmetic.

 

WJI

 


Indeed! :)


Cheers!

 

    dZ.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...