Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main.asm
- M
- Tipo
- Testo
- Dimensioni
- 1 kB (1.503 byte)
- Spazio di archiviazione
- 0 byteDi proprietà di un'altra persona
- Posizione
- part1.2
- Proprietario
- Matteo Castellani
- Modificato
- 14:52 da Matteo Castellani
- Creato
- 14:52
- Aggiungi una descrizione
- I visualizzatori possono scaricare
- ;;**************************************************************
- ;* This stationery serves as the framework for a *
- ;* user application. For a more comprehensive program that *
- ;* demonstrates the more advanced functionality of this *
- ;* processor, please see the demonstration applications *
- ;* located in the examples subdirectory of the *
- ;* Freescale CodeWarrior for the HC12 Program directory *
- ;**************************************************************
- ; Include derivative-specific definitions
- INCLUDE 'derivative.inc'
- ; export symbols
- XDEF Entry, _Startup, main
- ; we use export 'Entry' as symbol. This allows us to
- ; reference 'Entry' either in the linker .prm file
- ; or from C/C++ later on
- ; code section
- MyCode: SECTION
- main:
- _Startup:
- Entry:
- start: LDAA #$F0 ; load the DDRT register initialization value (bits 7 to 4 at ‘1’) in A
- STAA DDRT ; write the content of A to the DDRT register
- STAA PTT ; turn off the 4 LEDsDDRT (writing ‘1’)
- LDX #1000
- loop_X: CPX #0
- BEQ xor_A
- DEX
- BRA loop_X
- loop_Y: LDY #1000
- CPY #0
- BEQ done_Y
- DEY
- BRA loop_Y
- done_Y: JMP loop_X
- xor_A: EORA #$F0
- JMP ppt_A
- ppt_A: STAA PTT ; turn off the 4 LEDsDDRT (writing ‘1’)
- LDX #1000
- JMP loop_X
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement