Searching \ for 'A quick routine to clear all memory 16c74 ?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/memory.htm?key=memory
Search entire site for: 'A quick routine to clear all memory 16c74 ?'.

Truncated match.
PICList Thread
'A quick routine to clear all memory 16c74 ?'
1996\09\27@180006 by NEIL GANDLER

flavicon
face
I remeber once reading about a quick routine to clear all user
defined bytes in the 16c74. This would be helpfull when there is
a reset that is not a POR, yet would like to clear all memory.
I would appreciate any info.

               Neil Gandler

1996\09\29@150350 by fastfwd

face
flavicon
face
NEIL GANDLER <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

> I remeber once reading about a quick routine to clear all user
> defined bytes in the 16c74. This would be helpfull when there is a
> reset that is not a POR, yet would like to clear all memory. I would
> appreciate any info.

Try this, Neil:

       MOVLW   020H            ;PREPARE TO ZERO ALL GENERAL-PURPOSE
       MOVWF   FSR             ;REGISTERS.

   CLRRAM:

       MOVLW   080H            ;ARE WE POINTING PAST THE FINAL PAGE-0
       XORWF   FSR,W           ;REGISTER?

       SKPNZ                   ;IF NOT, SKIP AHEAD.

       BSF     FSR,BIT5        ;OTHERWISE, ADJUST FSR TO SKIP OVER
                               ;THE PAGE-1 SPECIAL-PURPOSE REGISTERS.

       CLRF    INDF            ;ZERO THE REGISTER AT WHICH WE'RE
                               ;POINTING.

       INCFSZ  FSR             ;HAVE WE DONE THEM ALL?
       GOTO    CLRRAM          ;IF NOT, LOOP BACK AND ZERO ANOTHER.

-Andy

Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
Fast Forward Engineering, Vista, California
http://www.geocities.com/SiliconValley/2499


'A quick routine to clear all memory 16c74 ?'
1996\10\01@123140 by Mark K Sullivan
flavicon
face
Back in the 8080 days, there was a short lived informal race to see who could
clear all memory in the fewest instructions.  Someone eventually got it down to
two instructions.

Let's see what we can come up with for the PIC.

- Mark Sullivan -

1996\10\01@153634 by Kalle Pihlajasaari

flavicon
face
hi Mark,

> Back in the 8080 days, there was a short lived informal race to see who could
> clear all memory in the fewest instructions.  Someone eventually got it down
to
> two instructions.

Sounds like CORE WARS.  Whatever happened to them anyway?

Cheers
--
Kalle Pihlajasaari     kallespamKILLspamdata.co.za
Interface Products     Box 15775, Doornfontein, 2028, South Africa
+27 (11) 402-7750      Fax: +27 (11) 402-7751

1996\10\01@222458 by Wireless Scientific

flavicon
face
At 09:24 PM 10/1/96 +0200, Kalle Pihlajasaari wrote:
>hi Mark,
>
>> Back in the 8080 days, there was a short lived informal race to see who could
>> clear all memory in the fewest instructions.  Someone eventually got it down
> to
>> two instructions.
>
>Sounds like CORE WARS.  Whatever happened to them anyway?

Gates happened.
____________________________________________________
Dr. Craig Hollabaugh
Wireless Scientific, Inc.
1890 S. 14th, Suite 105
Amelia Island, FL 32034
904 261 6977
904 261 2129 fax
.....wsciKILLspamspam.....net-magic.net

1996\10\02@075138 by Michael J. McCann

flavicon
face
> hi Mark,
>
> > Back in the 8080 days, there was a short lived informal race to see who
could
{Quote hidden}

How do you clear an 8080's memory with just two instructions ? Does anyone on
the list remember how this was done ?

Mike McCann KB2FMG

1996\10\02@083557 by Clyde Smith-Stubbs

flavicon
face
Mike McCann mused:

> How do you clear an 8080's memory with just two instructions ? Does anyone on
> the list remember how this was done ?

I don't actually remember the challenge, but as an 8080 programmer from
way back, it seems to me this is as close as you can get:

       org     0FFFDh

       call    0
       jmp     0FFFDh

The "call 0" pushes 0 (the address of the next instruction) onto the
stack, and this just goes around forever. 8080's reset to zero, so this
would work in practice, just as long as the two instructions were in
ROM, so they couldn't get overwritten. I can't remember what the 8080
SP is set to on power-up, I have a feeling it's undefined, but my 8080
reference book isn't handy to check - our office got flooded on
Monday, so everything had to be moved out while the carpet is dried :-(

Cheers, Clyde

--
Clyde Smith-Stubbs       | HI-TECH Software,       | Voice: +61 7 3354 2411
clydespamspam_OUThitech.com.au      | P.O. Box 103, Alderley, | Fax:   +61 7 3354 2422
http://www.hitech.com.au | QLD, 4051, AUSTRALIA.   |
---------------------------------------------------------------------------
For info on the World's best C cross compilers for embedded systems, point
your WWW browser at http://www.hitech.com.au, or email @spam@infoKILLspamspamhitech.com.au

1996\10\02@095208 by Jim Robertson

flavicon
face
At 07:43 AM 10/2/96 EDT, you wrote:
>> hi Mark,
>>
>> > Back in the 8080 days, there was a short lived informal race to see who
>could
>> > clear all memory in the fewest instructions.  Someone eventually got it
down
{Quote hidden}

Well, I think you could do this:

0000 jmp 0fffdh

;;;

0fffdH call 0000

This will fill the entire memory with 0000's will it not?
I didn't think it possible until I thought of the above.

Regards

Jim

1996\10\02@095628 by Jim Robertson

flavicon
face
At 10:34 PM 10/2/96 +1000, you wrote:
{Quote hidden}

Ok, you beat me to the piclist Clyde, but our anwsers were the same!

Jim

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...