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


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

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




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

You can use nop's (no operations) to slow down.  Make sure to time the loop
on the calculator you will be using so you can be sure that the timing is
accurate.  A good way to do this is to make a loop that will go for 10-20
seconds, and time it with a stop watch (have it print a message when it
starts/stops).

The loop below has 20 nop's, which take 80 t-states total, and the loop
control code should take an additional 22 t-states, including the jump,
giving a total of 102 t's.  Looping 1000 times would give 102,000 t's.  If
the cpu really runs at 6mhz, then that should be ~ 1/60 of a second.  Again,
you will need to use much larger values and time it externally to be
certain.  It also depends on the kind of accuracy you need.  It might
actually take longer than the stated t-states, because of the prefetch cache
(I don't have enough technical documentation on the z80 to be certain of
this).

 ld bc,1000
Delay:
 nop \ nop \ nop \ nop \ nop
 nop \ nop \ nop \ nop \ nop
 nop \ nop \ nop \ nop \ nop
 nop \ nop \ nop \ nop \ nop
 dec bc
 ld a,b
 cp c
 jr nz,Delay

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

Check out the help file that comes with Assembly Studio 8x.  It is very
helpful, and explains all the instructions.





References: