[A83] Re: Printerdriver for the TI-83(+)
[Prev][Next][Index][Thread]
[A83] Re: Printerdriver for the TI-83(+)
>A thought for optimization:
Looks good, but it's only neccesary because of size (you smallend it a huge
bit!), not speed, since it has to be slown down enourmously.
>SendData:
> ld a,(hl) ;hl=input
> inc hl
> or a
> jr z,sendDataDone
> ld b,8
> ld c,a
>SendByteLoop:
> ..[wait]..
> rr c
;I'm just starting asm coding (well, 6 months probably) so I don't know
;many commands.
;What does 'rr' do? Roll Right & bit?
;This could be extremely useful, because if the bits should be rolled
;left it can be done by changing one command instead of 8.
> jr c,sendBit1
>sendBit0:
> ld a,$C0
> jr sendBitDone
>sendBit1:
> ld a,$C3
>sendBitDone:
> out (0),a
> djnz sendByteLoop
> jr sendData
>sendDataDone:
> ld hl,txt
> bcall(_puts)
> ret
>txt:
> .db "Thank you for "
> .db "using [name] "
> .db "made by http:// "
> .db "zeekoe.cjb.net "
> .db "Thanks to: "
> .db [list of names]
>
>>From: "Ronald Teune" <rtwolf@gmx.net>
>>
>>Concept printer driver for the ti 83(+):
>>
>>Begin:
>> ld a,(hl) ;hl=input
>> cp $00
>> jr z,stop
>> [wait]
>> bit a,0
>> call nz,out1
>> call z,out0
>> [wait]
>> bit a,1
>> call nz,out1
>> call z,out0
>> [wait]
>> bit a,2
>> call nz,out1
>> call z,out0
>> [wait]
>> bit a,3
>> call nz,out1
>> call z,out0
>> (...)
>> [wait]
>> bit a,7
>> call nz,out1
>> call z,out0
>> inc hl
>> jp begin
>>out0:
>> [wait]
>> ld a,C0h
>> out(00),a
>> ret
>>out1:
>> [wait]
>> ld a,C3h
>> out(00),a
>> ret
>>stop:
>> ld hl,txt
>> bcall(_puts)
>> ret
>>txt:
>> .db "Thank you for "
>> .db "using [name] "
>> .db "made by http:// "
>> .db "zeekoe.cjb.net "
>> .db "Thanks to: "
>> .db [list of names]
>
>
>_________________________________________________________________
>Download MSN Explorer gratis van http://explorer.msn.nl/intl.asp
>
>
>
Follow-Ups: