aboutsummaryrefslogtreecommitdiff
path: root/lib/cpcrslib/cpc_SetColour.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_SetColour.s
downloadreturn-of-traxtor-cpc-c3b0fa04a663fe233765b83d3be41a42aa08c25d.tar.gz
return-of-traxtor-cpc-c3b0fa04a663fe233765b83d3be41a42aa08c25d.zip
Initial import for public releaseHEADmain
Diffstat (limited to 'lib/cpcrslib/cpc_SetColour.s')
-rw-r--r--lib/cpcrslib/cpc_SetColour.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/cpcrslib/cpc_SetColour.s b/lib/cpcrslib/cpc_SetColour.s
new file mode 100644
index 0000000..7fd6dc3
--- /dev/null
+++ b/lib/cpcrslib/cpc_SetColour.s
@@ -0,0 +1,16 @@
+.globl _cpc_SetColour
+
+_cpc_SetColour:: ;El número de tinta 17 es el borde
+ LD HL,#2
+ ADD HL,SP
+ LD A,(HL)
+ INC HL
+ ;INC HL
+ LD E,(HL)
+ LD BC,#0x7F00 ;Gate Array
+ OUT (C),A ;Número de tinta
+ LD A,#64 ;@01000000 ;Color (y Gate Array)
+ ADD E
+ OUT (C),A
+ RET
+