Announcement

Collapse
No announcement yet.

Euro sign for PB for DOS programs & printing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Hi Don

    Funny that, my first effort (for printing envelopes sideways)
    used that method on an old Epson 9-pin!
    I shall dig up the code to change fonts for you, it involves
    POKEing the 4096-byte character set into RAM, & then calling
    an Int10H function.
    In the meantime, if you send me an email, I'll send you some
    previously-made fonts & a prog to load them into RAM & invoke
    them.

    [email protected]

    ------------------

    Comment


      #22
      Hi Don, just found this. I think it gets the screen font into a
      string. Written in QB7, using my own Memcopy, should be fairly
      obvious. Shouldn't break anything!

      Code:
      DECLARE SUB Memcopy (fromseg%, fromoff%, toseg%, tooff%, len%, dir%)
      
      FUNCTION PeekChars$
      
      lth% = 4096
      t$ = SPACE$(lth%)
      Memcopy &HC000, &H6126, SSEG(t$), SADD(t$), lth%, 1
      PeekChars$ = t$
      
      END FUNCTION


      ------------------

      Comment


        #23
        DEF SEG segment
        A$ = PEEK$(offset, count)
        DEF SEG

        ...is much easier in PowerBASIC than that QB carry-on!

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


          #24
          Yes, but QB's got a stepping debugger!

          ------------------

          Comment


            #25
            So has PowerBASIC...

            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment


              #26
              Thanks David and Lance,
              Just what I needed to know, the segment and offset.
              I am going to play around with extra characters on screen.
              Don


              ------------------

              Comment


                #27
                Unfortunately the location of the font in ROM differs from
                computer to computer. There are also 3 fonts in the RAM on
                this one, 8,14 and 16 bytes per character.
                Don


                ------------------

                Comment


                  #28
                  Hi Don
                  You need this:

                  buf$ is a 4096-byte string containing the font bitmaps to use.
                  The 16-byte fonts are VGA 640x480, 14-byte EGA 640x350. 8-byte
                  are used in 43/50 line mode.

                  (INT 10 1100 - VIDEO - TEXT-MODE CHARGEN - LOAD USER-SPECIFIED PATTERNS (PS,EGA,VGA))

                  SUB Usechars (buf$)

                  inregX.ax = &H1100
                  inregX.bx = &H1000
                  inregX.cx = &HFF
                  inregX.dx = 0
                  inregX.es = SSEG(buf$)
                  inregX.bp = SADD(buf$)
                  CALL InterruptX(&H10, inregX, outregX)

                  END SUB

                  Ralf Brown's Interrupt List is the place to look for this stuff.
                  Drop me an email & I'll send you some bits & pieces. It was a
                  long time ago that I did the font creation stuff, it mostly got
                  compiled into .OBJs & .LIBs, so rooting out the source is a bit
                  haphazard!

                  ------------------

                  Comment


                    #29
                    From QB to PB:

                    %AX = 1 : %BX = 2 : %CX = 3 : %DX = 4
                    %SI = 5 : %DI = 6 : %BP = 7 : %DS = 8
                    %ES = 9 : %FLAGS = 0

                    SUB Usechars (buff$)
                    REG %AX, &H1100
                    REG %BX, &H1000
                    REG %CX, &HFF
                    REG %DX, 0
                    REG %EX, VARSEG(buf$) 'These two lines are the only ones I am
                    REG %BP, VARPTR(buf$) 'unsure of. I compared PB and QBX help.
                    CALL INTERRUPT &H10
                    END SUB

                    ------------------
                    Amos
                    DosOS.com
                    mailto:[email protected][email protected]</A>

                    Comment


                      #30
                      When dealing with strings, use STRSEG and STRPTR to get the location
                      of the actual string data, not VARSEG and VARPTR, which return the
                      location of the string handle.

                      Where it says "REG %EX" is meant "REG %ES".


                      ------------------
                      Tom Hanlin
                      PowerBASIC Staff

                      Comment


                        #31
                        Thanks again Tom,

                        You are always a big help! The %EX was a typo.

                        Also, thanks for converting those statements correctly for me..
                        now I see why a lot of my QB to PB conversions don't work right.

                        Amos

                        ------------------
                        Amos
                        DosOS.com
                        mailto:[email protected][email protected]</A>

                        Comment


                          #32
                          Topic closed due to extreme length. If further discussion is warranted, please start a new thread and include a URL link to this thread.

                          Thanks!


                          ------------------
                          Lance
                          PowerBASIC Support
                          mailto:[email protected][email protected]</A>
                          Lance
                          mailto:[email protected]

                          Comment

                          Working...
                          X
                          😀
                          🥰
                          🤢
                          😎
                          😡
                          👍
                          👎