RSS Bot Posted April 23, 2018 Share Posted April 23, 2018 Programing Axiom - The solution for every programming problem becomes obvious only after the solution has been found. The PARAPRNT(2) and SYSDRAW(44) Diamond functions are both used to print text or font elements to the screen. The SYSDRAW is fast because it is a no frills text display function. If you have the time, the PARAPRINT allows the use of control characters in the text object to create bold, italic, outline, underline, inverse, light, mirror, and reverse characters. You can also change fonts and enlarge the print using magnification factors. The 3.0 programming manual covers PARAPRINT and the text object on page 6 and 7. I had a problem getting the PARAPRNT macro to display a three character string at magnification level 4 for both height and width. Actually I couldn't get the macro to display anything and it took me a couple of days to find the obvious solution. The Function parameters as explained in Appendix I: Function Reference PARAPRNT (2) - Prints a text string using Diamond's styling and font features. Receives: B0 - X Offset B1 - Y Offset B2 - Line spacing W1 - X Position W2 - Y Position W3 - X Clipping Location W4 - Y Clipping Location W5 - Address of the Text String Returns: None You can set up the Diamond registers, load the Accumulator with the function number and JSR to Diamond or…… Use the MAC/65 PARAPRNT macro in the DMACROS.M65 file. There are a few options that are configured within the macro. If you are not using the B0,B1,W3 and W4 settings you can use the macro call …. PARAPRNT ADDR of TEXT, X,Y,LINESPACING Although I couldn't get it to work until….. Spoiler Alert - just in case you want to solve this one on your own. The obvious solution is: 1- In the macro file DMACROS.M65, locate the PARAPRNT macro . PARAPRNT is the second macro in the file. The line number changes if you are using the library included with Developer's Kit version 2.0 or 3.0. 2- You want to set W3 and W4 to $FF. Add the line "LDA #$FF" after the line setting B1 to 0. LDA #0 STA B0 STA B1 LDA #$FF ;added date by self STA W3 STA W3+1 STA W4 STA W4+1 3- comment this line for future reference and save the macros. 4- Be sure the .INCLUDE directive is pointing to the revised file. I started seeing characters printed to the screen on the first try using the modified macro. The following example code is being used to build and test a subroutine that will be added to a much larger program. Its what was used to test the macro fix. 10 ;MATH AND PRINT SUBROUTINE TEST 20 ; 30 .OPT NO LIST 40 *= $4000 50 ; 60 .INCLUDE #D:DMACROS.M65 70 ; 80 PU .BYTE "XXX - 60THS SEC.",255 90 PBLANK .BYTE " ",255 0100 BPMU .BYTE "BPM",255 0110 BPMBLANK .BYTE 252,0,254,4,255,4 0120 .BYTE "123",0 ;CHANGE LATER 0130 ; 0140 START ; DIAMOND MACROS 0150 INIT 0 0160 SYSDRAW PU,11,125,0 0170 SYSDRAW BPMU,25,72,0 0180 PARAPRNT BPMBLANK,52,48,8 0190 ; 0200 ; 0210 LOOP EVENT 0220 LDA EVENTTYPE 0230 BEQ LOOP 0240 EXIT 0250 EXECDESKTOP 0260 ; 0270 *= $02E0 0280 .WORD START P.S. If this is old news please let me know where I can find any other old Diamond news on the web. http://atariage.com/forums/blog/556/entry-14680-diamond-gos-paraprnt-macro-fix/ Link to comment Share on other sites More sharing options...
Recommended Posts