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_RLI.s | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lib/cpcrslib/cpc_RLI.s (limited to 'lib/cpcrslib/cpc_RLI.s') diff --git a/lib/cpcrslib/cpc_RLI.s b/lib/cpcrslib/cpc_RLI.s new file mode 100644 index 0000000..92a9385 --- /dev/null +++ b/lib/cpcrslib/cpc_RLI.s @@ -0,0 +1,39 @@ +.globl _cpc_RLI ;rota las líneas que se le digan hacia la izq y mete lo rotado por la derecha. + +_cpc_RLI:: + LD IX,#2 + ADD IX,SP + LD L,0 (IX) + LD H,1 (IX) ;posición inicial + LD A,2 (IX) ;lineas + LD (alto_cpc_RLI+1),A + LD A,3 (IX) ;ancho + LD (ancho_cpc_RLI+1),A + DEC HL +alto_cpc_RLI: + LD A,#8 ;; parametro +ciclo0_cpc_RLI: + PUSH AF + PUSH HL + INC HL + LD A,(HL) + LD D,H + LD E,L + DEC HL + LD B, #0 +ancho_cpc_RLI: + LD C,#50 ; parametro + LDDR + INC HL + LD (HL),A + POP HL + POP AF + DEC A + RET Z + LD BC,#0X800 ;salto de línea, ojo salto caracter. + ADD HL,BC + JP NC,ciclo0_cpc_RLI ;sig_linea_2zz ;si no desborda va a la siguiente linea + LD BC,#0XC050 + ADD HL,BC + JP ciclo0_cpc_RLI + -- cgit v1.2.3