Motorola Axiom CMD11E1 Guía de usuario Pagina 63

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 101
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
Vista de pagina 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 100 101

Comentarios a estos manuales

Sin comentarios