optimizo 1 byte

This commit is contained in:
antoniovillena 2022-12-29 15:12:53 +01:00
parent 8951593bd6
commit b0392db0dc
2 changed files with 4 additions and 5 deletions

Binary file not shown.

View File

@ -19,7 +19,7 @@
; ;
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
; output RTC.SYS output RTC.SYS
define SCL0SDA0 00b define SCL0SDA0 00b
define SCL0SDA1 01b define SCL0SDA1 01b
@ -132,12 +132,11 @@ Suma10 add a, 10
Params db 0, 0, 0, 0, 0, 0, 0 ;La hora a la que quieres poner el reloj Params db 0, 0, 0, 0, 0, 0, 0 ;La hora a la que quieres poner el reloj
; S M H D W Mo Y En lectura, estos datos se machacan con la hora leída del RTC ; S M H D W Mo Y En lectura, estos datos se machacan con la hora leída del RTC
SendByte scf ;Enviar un byte por I2C. Byte en A. BC=puerto de datos del ZXUNO ya
adc a, a ;apuntando a I2CREG. Usa y modifica: A, D, flags
Trans call c, Send1 Trans call c, Send1
call nc, Send0 call nc, Send0
and a add a, a
db $38 ;jr nc, +$37 / jr TransBit
SendByte scf ;Enviar un byte por I2C. Byte en A. BC=puerto de datos del ZXUNO ya
TransBit adc a, a ;apuntando a I2CREG. Usa y modifica: A, D, flags
jr nz, Trans jr nz, Trans
Send1 ld d, SCL0SDA1 Send1 ld d, SCL0SDA1
out (c), d out (c), d