Fw: More ???s

rr RRauscher at nni.com
Sat May 29 23:05:23 GMT 1999


HTH's:

I'll mostly be speaking from the operation of the mc6803,
apparently whats in the '747.

A cheat sheet can be found at:

        ftp://ftp.comlab.ox.ac.uk/pub/Cards/6803


Bruce Plecan wrote:
> 
> 9500 would mean to start something new, by jumping to a subroutine?.
> 
> The value at L01E6  "load to accumulator A"  means to place it at a location
> for further use.
> 

Two accumulators; A & B, 8 bits (byte) each. These are a temporary
register (like memory), locationed in the u-proc.

Can also do a LDD, which is a load accum A&B as a 16 bit (2 byte)
value. The 'loads' can come from a ram location, or, a rom/eprom 
location.

There is also reg X, an indeX register. 16 bits, can be used for
indexing into memory, such as tables. Or, as fast temp storage.

> Now when it says to compare to memory what is that?.....
> 
> Branch set carry?.
> 
> Add memory to A.

adda #0x9C: Add the immediate value of 0x9c, to the value of
reg A, and place the result back into reg A. Set Carry flag,
if result was larger than the register (8 bits/1 byte), the
max of 0xFF (hex) or 255 decimal.

> 
> Knowing what is stored at  L01E6, ie a timing value would be a clue about
> what is being looked at?.
> 
> | 9500    L9500:  jsr     LD776        Jump to subroutine

Jump to Sub-Routine, like a common table loop up routine, and
return to here when it's done. Usally will leave 'return' values
in registers, as the result of whatever the routine does.


> | 9503            ldaa    L01E6            Load Accumulator A
> | 9506            cmpa    #0x28           Compare A to memory

A compare is a subtraction with the result thrown away. Again, the
carry flag is used to shown that a 'borrow' took place. Sub the 
immed val of 0x28 from the val in reg A, set the proper flags,
and be done.


> | 9508            bcs     L950C            Branch if carry set

Do the branch if: the value in A, was smaller then 0x29. Carry flag set.


There's a bunch of flags set after each operation. For a 'cmpa', the
following
are set by the result of the compare.

	carry, zero, overflow, negative.

These flags can then be used to branch to a different path through the
code.

> | 950A            adda    #0x9C          Add memory to A
> | 950C    L950C:  rts                       Return from Subroutine

Ah, the compliment to 'jsr', returns to one of these.

> 
> Grumpier
> | 950D    L950D:  lds     #0x02FF  Load Stack Pointer


BobR.

--




More information about the Gmecm mailing list