-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
z80.scroll
44 lines (38 loc) · 1.1 KB
/
z80.scroll
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
import ../code/conceptPage.scroll
id z80
name z80
appeared 1976
tags assembly
fileType text
codeMirror z80
centralPackageRepositoryCount 0
reference https://en.wikipedia.org/wiki/Zilog_Z80#Z80_assembly_language
example
; memcpy --
; Copy a block of memory from one location to another.
;
; Entry registers
; BC - Number of bytes to copy
; DE - Address of source data block
; HL - Address of target data block
;
; Return registers
; BC - Zero
org 1000h ;Origin at 1000h
memcpy public
loop ld a,b ;Test BC,
or c ;If BC = 0,
ret z ;Return
ld a,(de) ;Load A from (DE)
ld (hl),a ;Store A into (HL)
inc de ;Increment DE
inc hl ;Increment HL
dec bc ;Decrement BC
jp loop ;Repeat the loop
end
lineCommentToken ;
hasLineComments true
; A comment
hasComments true
; A comment
hasSemanticIndentation false