Re: A83: Re: Re: Some question about ASM 83
[Prev][Next][Index][Thread]
Re: A83: Re: Re: Some question about ASM 83
In a message dated 9/18/00 9:08:53 PM Eastern Daylight Time,
paxl@caramail.com writes:
> But can you tell me how many clock halt stop the prosessor?
> And if anyone know how to explain what is the use of .dw and how to use it
>
Halt stops the processor until an interrupt occurs. If you have interrupts
disabled, then the only thing that can get you out of a halt is a
non-maskable interrupt, which the calcs don't have. Assuming they're
enabled, it will generally wait for the next timer interrupt; 200 of these
occur each second so the time delay will be a maximum of 1/200th of a second
and a minimum of no time at all. Unlike nops, a halt will save battery
power, and this can be observed in the slight increase in contrast level in
programs which heavily use the halt instruction. It's VERY good for
batteries.
.dw is define word, just like .db is define byte. For example to define a
string you use .db "hello",0 since each character is 1 byte. .dw is most
useful when defining addresses such as in a jump table:
ld l,a
ld h,0
add hl,hl
ld de,jump_table
add hl,de
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
jp (hl)
jump_table:
.dw address1
.dw address2
.dw address3
.dw address4
----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org