Found a great (free) book for assembly on HC08

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Found a great (free) book for assembly on HC08

667 Views
JohnnyP
Contributor III
"Microcomputer Architecture: low-level programming methods and applications of the M68HC908GP32" by D.E. Bolanakis, E. Glavas, G.A. Evangelakis, K.T. Kotsis, and T. Laopoulos

A link on their site lets you download a pdf copy:

Welcome the website http://electronics.physics.auth.gr/microcon

 

I don't know C, but I can get by in assembly on the 9s12.  Not so much with the 9s08.

 

I'm trying to make a one-shot out of a timer in assembly, on 9s08QG4.

 

From Jim Donelson in another thread:

TPM1C0V  =    TPM1CNT + MY_DELAY;

 

For my application, MY_DELAY is the wiper voltage of a pot.  At midrange it's $80, which should make a 512usec pulse:

(32/8E6) * 128 = 512 usec

 

lalala (singing)

ldhx TPMCNT

add  MY-DELAY

lalal...la...???

How do I add that so I can put it into TPMCOV??

 

So, after much googling for assembly help, I found THAT book which shows 16 bit addition in assembly:

 

            ORG         RAM_MEMORY
intA        RMB         2
intB        RMB         2
sum         RMB         3

 

            ORG         PROGRAM_MEMORY
            LDA         intA+1
            ADD         intB+1
            STA         sum+2
            LDA         intA+0
            ADC         intB+0
            STA         sum+1
            LDA         sum+0
            ADC         #!0
            STA         sum+0

 

I should be able to take it from here.

Labels (1)
0 Kudos
Reply
0 Replies