Motorola Axiom CMD11E1 Guía de usuario Pagina 70

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 101
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 69
70 CHAPTER 5. TABLES
; print 2 spaces so the output looks neat
ldaa #’
jsr outa
jsr outa
pula ; get it back
jsr outa
jsr outcrlf
bra mainloop
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;translate: Translates telephone codes.
;Entry: Register A has the value to be translated
;Exit: If A has an upper case letter, then its content is replaced
; by the the translation given on the phone is performed
; ABC -> 2, DEF ->3, etc.
; If A has any other character, it is left alone.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
translate
ldx #alphabet
ldab #nalphabet
jsr lookup
bcc bye ; Not an alphabet. Leave it alone
ldaa nalphabet,x ; This is the key to translation
bye
rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
Vista de pagina 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 100 101

Comentarios a estos manuales

Sin comentarios