A83: $0D


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

A83: $0D




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!