forked from Z80-Retro/2063-Z80-cpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.asm
59 lines (50 loc) · 1.58 KB
/
hello.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
;****************************************************************************
;
; Copyright (C) 2021,2022 John Winans
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
; License as published by the Free Software Foundation; either
; version 2.1 of the License, or (at your option) any later version.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with this library; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
; USA
;
;****************************************************************************
include 'io.asm'
include 'memory.asm'
org LOAD_BASE ; the second-stage load address
ld sp,LOAD_BASE
; XXX Note that the boot loader should have initialized the SIO, CTC etc.
; XXX Therefore we can just write to them from here.
ld de,0
.loop:
; Display a hello world message.
inc de
ld a,d
call hexdump_a
ld a,e
call hexdump_a
call iputs
db ": Hello from the SD card!!!\r\n"
db 0 ; DON'T FORGET the null terminator!
; waste some time
ld hl,0
.dly:
dec hl
ld a,h
or l
jp z,.loop ; if done, go back & print again
jp .dly
; ...we never get here
include 'hexdump.asm'
include 'sio.asm'
include 'ctc1.asm'
include 'puts.asm'