'===========================================================================
' Subject: PRINT STRINGS THROUGH THE BIOS     Date: 02-06-97 (14:04)       
'  Author: Dave Navarro, Jr.                  Code: PB                     
'  Origin: dave@powerbasic.com              Packet: INTERRPT.ABC
'===========================================================================
'=============================================================================
'                   Source code snippet: PowerBASIC for DOS
'
'           Author: Dave Navarro, Jr. (dave@powerbasic.com)
' Copyright status: Public Domain
'
' Print strings through the BIOS.
'
'=============================================================================

BIOSPrint "Hello World!"

SUB BIOSPrint(X$) Static                  'print a string through the
BIOS
  Temp$ = X$ + CHR$(13) + CHR$(10)        'concatenate a CRLF to the
string
  FOR X = 1 TO LEN(Temp$)                 'for each character
    REG 1, &H0E00 + ASC(MID$(Temp$, X))   'service &HE in AH, char in AL
    REG 2, 0                              'text page zero in BH
    CALL INTERRUPT &H10                   'call the BIOS to print it
  NEXT
END SUB
