 DEVICE ZXSPECTRUM48
     ORG $8000
inicio:
    di
    ld sp,0

    ld hl, $5810 ;declaramos el punto de inicio
    ld bc,$FDFE
    
bucle1:
    in a,(c)
    bit 2,a 
    jr nz, bucle1

    ld (hl), 32 ;pintamos 
    inc hl
buclesoltar:    in a, (c)
                bit 2,a
                jr z, buclesoltar

                jr bucle1
    
bucle2:
    in b,(c)
    bit 0,a
    jr nz, bucle2

    ld (hl), 16 ;pintamos 
    dec hl
buclesoltar2:   in a(c)
                bit 0,a
                jr z, buclesoltar

                jr bucle2

fin: jr fin