aboutsummaryrefslogtreecommitdiff
path: root/lib/cpcrslib/cpc_DisableEnableFirmware.s
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-05-03 08:21:10 +0100
committerJuan J. Martinez <jjm@usebox.net>2021-05-03 10:00:00 +0100
commitc3b0fa04a663fe233765b83d3be41a42aa08c25d (patch)
tree0befda349001ef6ce306b39378f9c70ad917363e /lib/cpcrslib/cpc_DisableEnableFirmware.s
downloadreturn-of-traxtor-cpc-main.tar.gz
return-of-traxtor-cpc-main.zip
Initial import for public releaseHEADmain
Diffstat (limited to 'lib/cpcrslib/cpc_DisableEnableFirmware.s')
-rw-r--r--lib/cpcrslib/cpc_DisableEnableFirmware.s28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/cpcrslib/cpc_DisableEnableFirmware.s b/lib/cpcrslib/cpc_DisableEnableFirmware.s
new file mode 100644
index 0000000..00a8710
--- /dev/null
+++ b/lib/cpcrslib/cpc_DisableEnableFirmware.s
@@ -0,0 +1,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
+