Motorola M68CPU32BUG Manuel d'utilisateur Page 143

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 196
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 142
SYSTEM CALLS
M68CPU32BUG/D REV 1 5-29
.WRITE Output String Using Character Count .WRITE
.WRITELN .WRITELN
5.2.23 Output String Using Character Count
SYSCALL .WRITE – Output string
TRAP CODE: $0023
SYSCALL .WRITELN – Output string and <CR><LF>
TRAP CODE: $0024
.WRITE and .WRITELN format character strings with a count byte and output the string to the
default output port. After formatting, the count byte is the first byte in the string. The user passes
the starting address of the string. .WRITELN appends a <CR><LF> to the end of the string.
Entry Conditions:
Four bytes of parameters are positioned in the stack as follows:
SP ==> Address of string.<long>
Exit Conditions:
SP ==> Top of stack (parameter bytes removed)
EXAMPLE
MESSAGE1 DC.B 9,
"MOTOROLA "
MESSAGE2 DC.B 8,
"QUALITY!"
PEA MESSAGE1(PC)
Push address of string
SYSCALL .WRITE
Use TRAP #15 macro
PEA MESSAGE2(PC) Push address of other string
SYSCALL .WRITE Invoke function again
Vue de la page 142
1 2 ... 138 139 140 141 142 143 144 145 146 147 148 ... 195 196

Commentaires sur ces manuels

Pas de commentaire