summaryrefslogtreecommitdiff
path: root/coin/obj/coin.c.src
blob: b2a3cc390d111345178ea98fa207f78da52537c5 (plain)
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
85
86
87
88
89
90
91
92
93
94
	section	.text,"ax",@progbits
	assume	adl = 1
	section	.text,"ax",@progbits
	public	_main
_main:
BB0_1:
	ld	iy, -3145600
	call	_os_ClrLCD
	call	_os_HomeUp
	call	_os_DrawStatusBar
	ld	hl, L_.str
	push	hl
	call	_printf_
	pop	hl
	call	_os_GetKey
	ld.sis	de, 9
	or	a, a
	sbc.sis	hl, de
	jq	z, BB0_8
	call	_coinFlip
	add	hl, bc
	or	a, a
	sbc	hl, bc
	ld	de, L_.str.1
	jq	z, BB0_5
	ld	de, 1
	or	a, a
	sbc	hl, de
	jq	nz, BB0_6
	ld	de, L_.str.2
BB0_5:
	push	de
	call	_printf_
	pop	hl
BB0_6:
BB0_7:
	call	_os_GetCSC
	or	a, a
	jq	z, BB0_7
	jq	BB0_1
BB0_8:
	or	a, a
	sbc	hl, hl
	ret
	section	.text,"ax",@progbits

	section	.text,"ax",@progbits
	public	_coinFlip
_coinFlip:
	ld	hl, -4
	call	__frameset
	pea	ix + -4
	call	_time
	pop	de
	push	hl
	call	_srand
	pop	hl
	call	_rand
	ld	bc, 2
	call	__irems
	ld	sp, ix
	pop	ix
	ret
	section	.text,"ax",@progbits

	section	.rodata,"a",@progbits
	private	L_.str
L_.str:
	db	"Coin Flip",012o,"Press Enter to Flip",012o,"Press Clear to exit",012o,000o

	section	.rodata,"a",@progbits
	private	L_.str.1
L_.str.1:
	db	"Heads",000o

	section	.rodata,"a",@progbits
	private	L_.str.2
L_.str.2:
	db	"Tails",000o

	ident	"clang version 12.0.0 (https://github.com/jacobly0/llvm-project 170be88120e3aa88c20eea5615ba76b8f1d6c647)"
	extern	__Unwind_SjLj_Register
	extern	__Unwind_SjLj_Unregister
	extern	__frameset
	extern	_srand
	extern	__irems
	extern	_printf_
	extern	_rand
	extern	_os_GetCSC
	extern	_os_ClrLCD
	extern	_os_DrawStatusBar
	extern	_os_HomeUp
	extern	_time
	extern	_os_GetKey