[A83] Re: Printerdriver for the TI-83(+)


[Prev][Next][Index][Thread]

[A83] Re: Printerdriver for the TI-83(+)




> > sendData:
> >     ld   a,(hl)    ;hl=input
> >     inc  hl
> >     or   a
> >     jr   z,sendDataDone
> >     ld   b,8
> >     ld   c,a
> > sendByteLoop:
> >     ..[wait]..
> >     rr   c
> >     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]

>;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.

Yes, 'rr' Rotates a byte Right. In this case register C. If the bit that 
falls of is set, then 'rr' sets the carry, if not then it doesn't.

About that delay you need, I can't really help. I think you should start 
looking for more specific information about the communication protocol. What 
bytes do what, etc.
What also might help is a computer program that scans the serial port for 
data and tells you in what speed the data gets send or something.

Tijl Coosemans

_________________________________________________________________
Download MSN Explorer gratis van http://explorer.msn.nl/intl.asp