Freescale assembly Language

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

Freescale assembly Language

10,133 Views
venki
Contributor I
Hi,
I want to learn Freescale assembly language.Pls let me know where i get instruction sets with explanation of each.
 
Venki
Labels (1)
0 Kudos
10 Replies

1,224 Views
Curt
Contributor IV
Hi venki
 
I'd say:  pick a processor and buy a development/demo kit for it that comes with the
Freescale CodeWarrior IDE.    You'll have everything you need to learn the assembly language in one package -- and a hardware platform to experiment with. 
 
Or if that's too expensive for you right now (been there!) -- download the CodeWarrior special edition that supports the 'S08 seriec of Freescale components and learn the language via the full-chip simulator built-in to that IDE.
 
You'll be an expert before you know it!
 
 
0 Kudos

1,224 Views
peg
Senior Contributor IV
Hi venki,
 
As you posted another question about the GP32  assume this is what you are talking about here.
 
This document provides the best start in this case:
 
 
0 Kudos

1,224 Views
venki
Contributor I
Dear Peg,
Pls let me know what the below code does
 
MOV    #$01,$42
 
Regards
Venki
0 Kudos

1,224 Views
Alban
Senior Contributor II
Hi Venki,

This is where you need to look into the S08 CPU Reference Manual advised by Bigmac.

MOV means "move"
# means immediate value.
$ means hexadecimal.

So MOV #$01, $42 means put the value "1" at address 0x42.

Cheers,
Alban.
0 Kudos

1,224 Views
peg
Senior Contributor IV
Hi Venki,
 
What Alban said is correct, However if we are still talking about the GP32 you are better looking at
CPU08RM.pdf to find out what MOV does, and
MC68HC908GP32.pdf to find that $42 is just an address in the RAM.
So what it actually does is up to the programmer.
 
0 Kudos

1,225 Views
venki
Contributor I
Dear Mac,
I want to start learning Embeded C.Pls help me.
 
Regards
Venki
0 Kudos

1,224 Views
venki
Contributor I
Dear Peg,
Pls go through attached file & help me .
 
Regards
Venki
0 Kudos

1,225 Views
bigmac
Specialist III
Hello Venki,
 
Within your code snippet, there are tests for a total of five different timing events, presumably the result of a periodic timer interrupt.
 
The first timing event utilises a word value at RAM address $45, used as a counter, and a further word value at $47 that contains the address of a sub-routine to be executed in the event of timeout.  The contents of these registers will have been setup elsewhere within the program, likely outside of the interrupt code.  You will need to search for the other locations that write to these registers to identify what the timing events actually mean.
 
The processing of the timing event -
  1. Test counter value ($45/$46), and if non-zero, decrement the value - otherwise skip to next event.
  2. Test new counter value, and if zero (timeout), continue with current event - otherwise skip to next event.
  3. Test sub-routine address value ($47/$48), and if zero (invalid address), skip to next event.
  4. Execute sub-routine (JSR  ,X).
Each timing event follows a similar pattern, although the code is not quite identical, presumably because of the compiled C origins.
 
Regards,
Mac
 
0 Kudos

1,225 Views
venki
Contributor I
Dear Mac,
Pls find attached file & give your comments
 
Regards
Venki
0 Kudos

1,224 Views
bigmac
Specialist III
Hello Venki,
 
The reference given by Peg actually pertains to the nearly obsolete HC05 devices.  While HC08 assembly programming has similarities, and is backward compatible with the HC05, there are also a considerable number of differences that can simplify the code.  A complete reference to the newer instruction set may be found in the document, CPU08RM reference manual.  This also contains assembly programming examples.
 
If you were to consider the newer HCS08 devices, there are some further enhancements over the HC08, but the differences are fewer.  These are outlined within application note AN2717 "M68HC08 to HCS08 Transition".
 
Regards,
Mac
 
 
0 Kudos