Jump to content





Diamond GOS PARAPRNT macro fix

Posted by k-Pack , 23 April 2018 · 268 views

Diamond PARAPRNT
Diamond GOS PARAPRNT macro fix

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.






February 2019

S M T W T F S
     12
3456789
101112131415 16
17181920212223
2425262728  

Recent Comments

My Picture

Latest Visitors

  • Photo
    fdr4prez
    04 Nov 2018 - 7:20
  • Photo
    Curt Vendel
    19 Oct 2018 - 8:16
  • Photo
    NISMOPC
    06 Aug 2018 - 7:08
  • Photo
    DZ-Jay
    07 Jul 2018 - 5:28
  • Photo
    Allan
    28 Jun 2018 - 8:00
  • Photo
    walter_J64bit
    16 Jun 2018 - 7:06
  • Photo
    BurritoBeans
    15 Jun 2018 - 3:32
  • Photo
    Serguei2
    14 Jun 2018 - 6:45
  • Photo
    RevEng
    14 Jun 2018 - 1:00
  • Photo
    flashjazzcat
    07 Jun 2018 - 7:32
  • Photo
    Gibstov
    05 Jun 2018 - 10:04
  • Photo
    WIZZARD77
    24 Apr 2018 - 1:38
  • Photo
    Gray Defender
    18 Apr 2018 - 6:15
  • Photo
    SpiceWare
    12 Apr 2018 - 2:36
  • Photo
    zilog_z80a
    30 Mar 2018 - 12:25
  • Photo
    José Antonio
    14 Feb 2018 - 6:22
  • Photo
    BeamBradley
    29 Jan 2018 - 9:17
  • Photo
    SenorRossie
    24 Jan 2018 - 8:33
  • Photo
    redman
    21 Jan 2018 - 11:15
  • Photo
    Caterpiggle
    19 Jan 2018 - 3:09
  • Photo
    COREi64
    14 Jan 2018 - 7:56
  • Photo
    norm8332
    17 Dec 2017 - 3:14
  • Photo
    ToddL
    11 Nov 2017 - 9:54
  • Photo
    atari65xenajm
    17 Sep 2017 - 8:01
  • Photo
    Gandor
    24 Apr 2017 - 5:36
  • Photo
    opcode
    03 Mar 2017 - 7:24
  • Photo
    MVladimir
    30 Jan 2017 - 5:01
  • Photo
    rdemming
    30 Jan 2017 - 3:23
  • Photo
    electrotrains
    17 Jan 2017 - 5:15
  • Photo
    ronfucci
    16 Jan 2017 - 4:02
  • Photo
    k1w1
    16 Jan 2017 - 3:31
  • Photo
    serj
    15 Jan 2017 - 10:47
  • Photo
    krupkaj
    14 Jan 2017 - 6:42
  • Photo
    Timothy Kline
    14 Jan 2017 - 2:34
  • Photo
    MrFish
    14 Jan 2017 - 1:57
  • Photo
    Philsan
    14 Jan 2017 - 11:05
  • Photo
    Gunstar
    14 Jan 2017 - 10:36
  • Photo
    bf2k+
    14 Jan 2017 - 9:52
  • Photo
    AtariGeezer
    14 Jan 2017 - 9:15
  • Photo
    pimpmaul69
    12 Jan 2017 - 8:20