Motorola Axiom CMD11E1 Guide de l'utilisateur Page 70

  • 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 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
Vue de la page 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 100 101

Commentaires sur ces manuels

Pas de commentaire