        tabs    8,8                     ;first tab is 8, then each tab is 8 ahead
        width   132                     ;prevent folding of long lines
        noproces                        ;disable fancy stuff, speed is what we want
;
        title   "Phunsy 2650 Micro Computer"
        stitle  "hello"
;       FP-2010-11-21 (www.philipse.info)
;
        name    phunsy_hello            ;the module name
;
        INCLUDE "2650.inc"              ; 2650 definitions
        INCLUDE "ascii.inc"             ; ascii definitions
        INCLUDE "phunsy.inc"            ; phunsy i/o definitions
        INCLUDE "monitor.inc"           ; monitor definitions
;
        section rom                     ;
        org     00800h                  ;
;
HELLO   LODI,R2 0FFh                    ;
HELLOA  LODA,R0 BEGIN,R2+               ;
        COMI,R0 text                    ;
        RETC,LT                         ;
        RETC,GT                         ;
        LODA,R0 BEGIN,R2+               ;
        STRZ    R1                      ;
HELLOB  LODA,R0 BEGIN,R2+               ;
        ZBSR    wrtzv                   ;
        BDRR,R1 HELLOB                  ;
        ZBSR    wrtcr                   ;
        BCTR,UN HELLOA                  ;
;
BEGIN   BYTE    text,TEXT1E-TEXT1
TEXT1   BYTE    "PHUNSY microcomputer"
TEXT1E  EQU     $
        BYTE    text,TEXT2E-TEXT2
TEXT2   BYTE    "with Signetics 2650 cpu"
TEXT2E  EQU     $
        BYTE    text,TEXT3E-TEXT3
TEXT3   BYTE    "by Frank Philipse"
TEXT3E  EQU     $
        BYTE    text,TEXT4E-TEXT4
TEXT4   BYTE    "the Netherlands"
TEXT4E  EQU     $
        BYTE    text,TEXT5E-TEXT5
TEXT5   BYTE    "www.philipse.info"
TEXT5E  EQU     $
        BYTE    0,0                     ; anything but 'text' and one fill byte
;
;
;                                       == set character output to include write to extended i/o address 0 for logging
        org     0880h                   ; previous stuff is exactly 80h bytes...
LOGON   LODR,R0 logout
        STRA,R0 ioad
        LODR,R0 logout+1
        STRA,R0 ioad+1
        RETC,UN
;
chextio WRTE,R0 127                     ;               output character via extended i/o address 127
        BCTA,UN wchar                   ;               and keep normal screen output
;
;                                       == return to normal
        org     0890h                   ;
LOGOFF  LODI,R1 2
LOGOFFA LODA,R0 ioptrs,R1-
        STRA,R0 ioad,R1
        BRNR,R1 LOGOFFA
        RETC,UN
;
        BYTE    acon,2
logout  WORD    chextio                 ;
;
        BYTE    0                       ;fill to 89f
;
        END
