File: hilo.asm

package info (click to toggle)
pasmo 0.5.2-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 932 kB
  • ctags: 1,503
  • sloc: cpp: 8,180; asm: 3,020; sh: 790; makefile: 111
file content (84 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (8)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
;	hilo.asm

;	Test of HIGH and LOW operators.

bdos	equ 5

	org 100h

l1	equ 01234h
l2	equ 0FFFFh
l3	equ 0F07Fh

	ld a, high l1
	call showreg
	call showendline

	ld a, low l1
	call showreg
	call showendline

	ld a, high l1 or l3
	call showreg
	call showendline

	ld a, high (low l1) and l3
	call showreg
	call showendline

	call 0

showendline:	ld de, endline
	ld c, 9
	call bdos
	ret

endline	defb 0Dh, 0Ah, '$'

showreg:
	push bc
	push hl

	push af

	push af

	ld e, 20h
	ld c, 2
	call bdos

	pop af

	; Para ver mejor al trazar.
	and 0F0h

	rept 4
	rrca
	endm

	call shownibble

	pop af

	call shownibble

	pop hl
	pop bc
	ret	

shownibble:
	and 0Fh
	add a, 30h

	cp 3Ah
	jp c, isdigit

	add a, 7
isdigit:	

	ld e, a
	ld c, 2
	call bdos
	ret

;	End of showline.asm