Re: A83: $0D


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

Re: A83: $0D



$0D is 0D in hex, which IS 13 :-)

Count from 1 to 9, then start at A (10) and move on up to D.


In a message dated 2/6/01 4:38:50 PM Eastern Standard Time,
playnogamz@nls.net writes:


I was reading throught the shuffle routine in Solitare (TI-83 AShell) and
noticed that it compared the current number loaded in a with $0D after
anding A and 00001111b.

Shuffle:
  ld b,4                       ;the number of suits
  xor a                        ;ld a with 0
  ld hl,CARDLIST

CreateListLoop:
  ld (hl),a
  inc hl
  inc a
  ld c,a
  and %00001111                ;don't look at the suit
\THESE TWO LINES
  cp $0D                       ;when low nibble is $D, move to next suit
/THESE TWO LINES
  ld a,c
  jr nz,CreateListLoop
  add a,%00010000              ;move to the next suit (add 1 to high
nibble)
  and %11110000                ;reset the low nibble
  djnz CreateListLoop


What does $0D stand for.  I thought that it stood for 0 but that whould make
16 cards for each suite, and there should only be 13.  Thanks in advance!





----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org

Follow-Ups: