From c3b0fa04a663fe233765b83d3be41a42aa08c25d Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 3 May 2021 08:21:10 +0100 Subject: Initial import for public release --- lib/cpcrslib/cpc_PutMaskSp4x16.s | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 lib/cpcrslib/cpc_PutMaskSp4x16.s (limited to 'lib/cpcrslib/cpc_PutMaskSp4x16.s') diff --git a/lib/cpcrslib/cpc_PutMaskSp4x16.s b/lib/cpcrslib/cpc_PutMaskSp4x16.s new file mode 100644 index 0000000..4fbbd61 --- /dev/null +++ b/lib/cpcrslib/cpc_PutMaskSp4x16.s @@ -0,0 +1,56 @@ +.globl _cpc_PutMaskSp4x16 + +_cpc_PutMaskSp4x16:: + + LD IX,#2 + ADD IX,SP + LD L,2 (IX) + LD H,3 (IX) + LD E,0 (IX) + LD D,1 (IX) + .DB #0XFD + LD H,#16 + LD B,#7 +loop_alto_mask_4x16: + EX DE,HL + LD A,(DE) ;leo el byte del fondo + AND (HL) ;lo enmascaro + INC HL + OR (HL) ;lo enmascaro + LD (DE),A ;actualizo el fondo + INC DE + INC HL + ;COMO SOLO SON 4 BYTES, es más rápido y económico desplegar la rutina + LD A,(DE) ;leo el byte del fondo + AND (HL) ;lo enmascaro + INC HL + OR (HL) ;lo enmascaro + LD (DE),A ;actualizo el fondo + INC DE + INC HL + LD A,(DE) ;leo el byte del fondo + AND (HL) ;lo enmascaro + INC HL + OR (HL) ;lo enmascaro + LD (DE),A ;actualizo el fondo + INC DE + INC HL + LD A,(DE) ;leo el byte del fondo + AND (HL) ;lo enmascaro + INC HL + OR (HL) ;lo enmascaro + LD (DE),A ;actualizo el fondo + INC DE + INC HL + .DB #0XFD + DEC H + RET Z + EX DE,HL + LD C,#0XFC + ADD HL,BC + JP NC,loop_alto_mask_4x16 + LD BC,#0XC050 + ADD HL,BC + LD B,#7 + JP loop_alto_mask_4x16 + -- cgit v1.2.3