aboutsummaryrefslogtreecommitdiff
path: root/lib/cpcrslib/cpc_DisableEnableFirmware.s
blob: 00a8710bfe71d82b583324fa52339389e58bfc4c (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
.globl _cpc_DisableFirmware

_cpc_DisableFirmware::
	DI
	LD HL,(#0X0038)
	LD (backup_fw),HL
	LD HL,#0X0038
	LD (HL),#0XFB		;EI
	INC HL
	LD (HL),#0XC9		;RET
	EI
	RET

backup_fw:
	.DW  #0

.globl 	_cpc_EnableFirmware

_cpc_EnableFirmware::
	DI
	LD DE,(backup_fw)
	LD HL,#0X0038
	LD (HL),E			;EI
	INC HL
	LD (HL),D			;RET
	EI
	RET