diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 18:00:45 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 18:00:45 -0600 |
commit | df4aeab705353232c78e614b56296e585f833fa4 (patch) | |
tree | e82d5cac194d9834073cf8c24f5ae71cb8218d45 /misc/sims | |
parent | 72a9bdf3ac545e09de89671a5db3a4b6c19d1e1e (diff) | |
download | px4-nuttx-df4aeab705353232c78e614b56296e585f833fa4.tar.gz px4-nuttx-df4aeab705353232c78e614b56296e585f833fa4.tar.bz2 px4-nuttx-df4aeab705353232c78e614b56296e585f833fa4.zip |
TAB conversion, Windows line ending conversions
Diffstat (limited to 'misc/sims')
-rw-r--r-- | misc/sims/z80sim/example/example.asm | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/misc/sims/z80sim/example/example.asm b/misc/sims/z80sim/example/example.asm index 8dcbc31bd..70a123b82 100644 --- a/misc/sims/z80sim/example/example.asm +++ b/misc/sims/z80sim/example/example.asm @@ -1,84 +1,84 @@ -;************************************************************************
-; example.s
-;************************************************************************
-
- .title z80sim Test
- .module example
-
-;************************************************************************
-; Constants
-;************************************************************************
-
- STACKBASE == 0xFFFF
-
-;************************************************************************
-; Data
-;************************************************************************
-
- .area DATA (ABS,OVR)
- .org 0x8000
-hello:
- .ascii "Hello, World!\n\0"
-
-;************************************************************************
-; Reset entry point
-;************************************************************************
-
- .area TEXT (ABS,OVR)
- .org 0x0000
- di ; Disable interrupts
- ld SP, #STACKBASE ; Set stack pointer
- im 1 ; Set interrupt mode 1
- jp start ; jump to start of program
-
-;************************************************************************
-; Interrupt handler
-;************************************************************************
-
- .org 0x0038 ; Int mode 1
- reti ; return from interrupt
-
-;************************************************************************
-; NMI interrupt handler
-;************************************************************************
-
- .org 0x0066
- retn
-
-;************************************************************************
-; Start of program
-;************************************************************************
-
- .org 0x0100
-start:
- ;ei ; Enable interrrupts
- ld hl, #hello ; Say hello
- call print
-
-forever: ; Then stop execution
- jp forever
-
-;******************************************************************
-; print *
-; Funktion....: Sen tekst and data with serielport *
-; Input.......: hl points at text start adr *
-; Output......: Text to serielport *
-; uses........: a,hl*
-; call........: TX_BUSY tst 28-4-1994 *
-;******************************************************************
-
-print:
- push af
-loop:
- ld a, (hl) ; Get character to print
- cp #0 ; Null terminates the string
- jp z, done
-
- out (0xbe), a ; Send character
- inc hl ; Increment to next character
- jp loop ; Loop til done
-done:
- pop af
- ret
-
-
+;************************************************************************ +; example.s +;************************************************************************ + + .title z80sim Test + .module example + +;************************************************************************ +; Constants +;************************************************************************ + + STACKBASE == 0xFFFF + +;************************************************************************ +; Data +;************************************************************************ + + .area DATA (ABS,OVR) + .org 0x8000 +hello: + .ascii "Hello, World!\n\0" + +;************************************************************************ +; Reset entry point +;************************************************************************ + + .area TEXT (ABS,OVR) + .org 0x0000 + di ; Disable interrupts + ld SP, #STACKBASE ; Set stack pointer + im 1 ; Set interrupt mode 1 + jp start ; jump to start of program + +;************************************************************************ +; Interrupt handler +;************************************************************************ + + .org 0x0038 ; Int mode 1 + reti ; return from interrupt + +;************************************************************************ +; NMI interrupt handler +;************************************************************************ + + .org 0x0066 + retn + +;************************************************************************ +; Start of program +;************************************************************************ + + .org 0x0100 +start: + ;ei ; Enable interrrupts + ld hl, #hello ; Say hello + call print + +forever: ; Then stop execution + jp forever + +;****************************************************************** +; print * +; Funktion....: Sen tekst and data with serielport * +; Input.......: hl points at text start adr * +; Output......: Text to serielport * +; uses........: a,hl* +; call........: TX_BUSY tst 28-4-1994 * +;****************************************************************** + +print: + push af +loop: + ld a, (hl) ; Get character to print + cp #0 ; Null terminates the string + jp z, done + + out (0xbe), a ; Send character + inc hl ; Increment to next character + jp loop ; Loop til done +done: + pop af + ret + + |