Motorola Axiom CMD11E1 Betriebsanweisung Seite 70

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 101
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 100 101

Kommentare zu diesen Handbüchern

Keine Kommentare