home *** CD-ROM | disk | FTP | other *** search
- ; Squeeze-OUTCODE for Turbo-ARC. TR 011189
- .z80
-
- extrn cod,len,bitpos,tcode,putcod
-
- ld a,(len)
- or a
- ret z ; LEN=0 : nothing to do
- ld b,a ; B=bitcounter
- ld hl,tcode
- ld de,(cod)
- ld a,(bitpos)
- loop: srl d
- rr e
- rr (hl) ; shift bit into TCODE
- inc a
- and 7
- jr nz,loop1
- push af ; save all used registers
- push bc
- push de
- push hl
- call putcod ; output crypt(tcode)
- pop hl
- pop de
- pop bc
- pop af ; restore registers
- loop1: djnz loop
- ld (bitpos),a ; save bitpos for next code
-
- end
-