Motorola Axiom CMD11E1 Betriebsanweisung Seite 38

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 101
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 37
38 CHAPTER 3. FUNCTIONS AND BIT MANIPULATIONS
; the function destroys the value in a,
; so re load it! then print second digit
TBA
JSR OUTRHLF
; now print a colon and some spaces
LDAA #’:’
JSR OUTA
LDAA #’
JSR OUTA
JSR OUTA
JSR OUTA
; now print it in binary
; b has the value to be printed (recall the old tab)
;
; shift b to the left by one bit and print ’0’ or ’1’ depending
; on what is in the carry flag
; repeat 8 times.
;
; we will use X register as counter
; to print what is in carry flag, we will load A
; with the code for ’0’ ; and add the carry to the code
; prior to calling OUTA
LDX #8 *COUNTER
PRBLOOP CPX #0
BEQ PRBDONE
LDAA #’0’
LSLB
ADCA #0
JSR OUTA
DEX
BRA PRBLOOP
PRBDONE
JSR OUTCRLF
Seitenansicht 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 100 101

Kommentare zu diesen Handbüchern

Keine Kommentare