Hafızadaki bir texti 8x8 büyüklüğünde kaydıran program.
;-------------------------------------------------------;
; 8x8 TEXT SCROLL ;
; 10-07-2014 / HADES ;
; (153 bytes code) + text ;
;-------------------------------------------------------;
org $8000
main call $0d6b ;CLS command
ld a,2 ;S(creen) kanalını
call $1601 ;açıyoruz.
ld a,17
rst $10
xor a
out (254),a
rst $10
ld hl,22528
ld de,22529
ld bc,767
ld (hl),%00000101
ldir
again ld b,textend-text
ld ix,text
loop03 push bc
push ix
ld a,(ix+0)
ld ix,(23606) ;charset base
ld de,0
ld c,a
loop01 ld b,8
loop00 inc de
djnz loop00
dec c
jr nz,loop01
add ix,de ;karakter data adresi
ld b,8
ld de,temp
loop02 ld a,(ix+0)
ld (de),a
inc ix
inc de
djnz loop02
ld c,8 ;7 ;karakter data bit sayacı
nextbit ld b,8 ;karakter satır yüksekliği
ld de,temp
nextpos ld a,22 ;AT komutu
rst $10
ld hl,(pos)
ld a,h ;satır numarası (0)
rst $10
ld a,l ;sütun numarası (31)
rst $10
inc h
ld (pos),hl
ld a,(de)
rla ;karakterin 7.biti
ld (de),a
jr nc,space
ld a,$2e ;ekrana nokta basıyoruz
jr cont
space ld a,$20
cont rst $10
inc de
djnz nextpos
call scroll
ld hl,31
ld (pos),hl
dec c
jr nz,nextbit
nextchar pop ix
pop bc
inc ix
djnz loop03
jr again
;-----------------------------------------------------------------------------
scroll push bc
ld d,8
repeat ld hl,18431
ld c,64
nextline ld b,32
or a
nextbyte rl (hl)
dec hl
djnz nextbyte
dec c
jr nz,nextline
halt ;scroll delay
; halt ;delay
dec d
jr nz,repeat
pop bc
ret
;-----------------------------------------------------------------------------
pos defw 31
temp defb 0,0,0,0,0,0,0,0
text defm "8x8 text scroll by HADES/RET. "
defm "10-07-2014 "
textend
end $8000