Motorola Axiom CMD11E1 Guide de l'utilisateur Page 63

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 101
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 62
5.5. WORKING WITH TABLES 63
org $2100
ldx #preamble
jsr outstrg
mainloop
jsr inchar
ldx #vowels
ldab #nvowels
jsr lookup
bcs isvowel
ldx #nostr
jsr outstrgo
bra mainloop
isvowel ldx #yesstr
jsr outstrgo
bra mainloop
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; lookup: Function to lookup a value in a table
; Checks if the value in A register is in the table
;
; Entry: Starting address in X, size in B, value in A
; Exit: Carry set if the value in A is in the table;
; cleared if not in the table
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lookup
lkploop
tstb
beq notthere *this is the basic counting loop
cmpa 0,x
beq foundit
inx
decb
bra lkploop
notthere
clc
rts
foundit
sec
rts
Vue de la page 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 100 101

Commentaires sur ces manuels

Pas de commentaire