Difference between revisions of "83Plus:BCALLs:450A"

From WikiTI
Jump to: navigation, search
 
m (added di)
 
(One intermediate revision by one other user not shown)
Line 19: Line 19:
  
 
=== Destroys ===
 
=== Destroys ===
?
+
''None''
  
 
== Comments ==
 
== Comments ==
Since HL points to the character after the terminating zero of the string when the call is finished, you can put multiple strings in a row and display them all with calls to PutS.  See the example.
+
* Since HL points to the character after the terminating zero of the string when the call is finished, you can put multiple strings in a row and display them all with calls to PutS.  See the example.
 +
* This B_CALL disables interrupts.
  
 
== Example ==
 
== Example ==

Latest revision as of 10:21, 1 January 2010


Synopsis

Official Name: PutS

BCALL Address: 450A

Displays a string on the screen in the large font.

Inputs

  • (curRow, curCol): Position on screen of first character
  • HL: Zero-terminated string

Outputs

  • String displayed on screen
  • HL points to character after terminating zero of string

Destroys

None

Comments

  • Since HL points to the character after the terminating zero of the string when the call is finished, you can put multiple strings in a row and display them all with calls to PutS. See the example.
  • This B_CALL disables interrupts.

Example

ld hl,0
ld (curRow),hl
ld hl,string1
BCALL(PutS)
BCALL(PutS) ;hl points to string2 at this point
BCALL(PutS) ;hl points to string3 at this point
ret

string1: .db "This is a string  ",0
string2: .db "This is another string  ",0
string3: .db "Yet another string...",0

All three strings will be displayed in order, starting from the top-left corner of the screen.