; Web page updated 24-Jan-1999 ;----------------------------------------------------------------------------- ; This file demonstrates the error assistance support of qd ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- ; This program causes a message to be printed on the display ; and then returns control to the operating system. ; FOR USE WITH TRSDOS 6 AND THE QD ASSEMBLER ONLY ;----------------------------------------------------------------------------- ; Declare some constants that we will use dsply: equ 0ah ;SVC to display a message exit: equ 16h ;SVC to return control to TRSDOS ; Program Starts here psect 3000h ;Program is to be loaded in memory begin: ;starting here xegin: lxi h,message ;HL contains the address of the ;message to be displayed mvi a,dsply ;Load the SVC number we want to use ;to display a message rst 5 ;Tell the DOS to perform a SVC add 34 adi a,12 lxi d,34+*56 foo sub nop q ; Some expression evaluations lxi h,2*(begin/4) lxi d,((20+30)*50)/25 lxi b,((2+bad)/7) lxi d,(15*number))+17 lxi r,((2+bad)/7) number: equ $ mov a,exit ;Load the SVC number for returning ;to the operating system. rst 5 ;Execute the @EXIT SVC jmp foo ; The @EXIT svc does not return to this program ; This is the data area message: ascii /Hello World/ ;First part of the message byte 0dh ;This byte indicates the end of ;the message and that a carriage ;return should be performed.