Announcement

Collapse
No announcement yet.

Euro sign for PB for DOS programs & printing

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

  • Lance Edmonds
    replied
    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]suppo[email protected]</A>

    Leave a comment:


  • Amos Vryhof
    Guest replied
    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>

    Leave a comment:


  • Tom Hanlin
    replied
    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

    Leave a comment:


  • Amos Vryhof
    Guest replied
    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>

    Leave a comment:


  • David J Walker
    replied
    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!

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

    Leave a comment:


  • Don Ward
    replied
    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


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

    Leave a comment:


  • Don Ward
    replied
    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


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

    Leave a comment:


  • Lance Edmonds
    replied
    So has PowerBASIC...

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

    Leave a comment:


  • David J Walker
    replied
    Yes, but QB's got a stepping debugger!

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

    Leave a comment:


  • Lance Edmonds
    replied
    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>

    Leave a comment:


  • David J Walker
    replied
    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


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

    Leave a comment:


  • David J Walker
    replied
    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]

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

    Leave a comment:


  • Lance Edmonds
    replied
    Oh, and only the "enhanced" one worked properly on my HPIIID - the "non-enhanced" one printed a small 'e' where the '=' sign is positioned by the "enhanced" string.

    All my other HP and PCL printers are off-line at the moment (I have quite a few!) so I could not test it on them.

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

    Leave a comment:


  • Lance Edmonds
    replied
    JFYI, those Escape code sequences are in HP/PCL escape code format, for use with HP and compatible printers only.



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

    Leave a comment:


  • Henk Broekhuizen
    replied
    Another routine for printing the Euro. A solution contributed by Edward Mendelson, put into PB/CC style by me:
    Of course this solution should also work with PBforDOS:


    FUNCTION PBMAIN() AS LONG
    LOCAL euro AS STRING
    LOCAL euro2 AS STRING

    'euro="C"+CHR$(8)+CHR$(27)+"&a-.05R"+ CHR$(27)+"(s16H"+ CHR$(27)+ "(10U"+ CHR$(205)+ CHR$(8)+ CHR$(27)+"&a+.05R"+ CHR$(27)+"(s10H"+ CHR$(27)+"(8U"+" "
    'euro="C"+CHR$(8)+CHR$(27)+"&a-.05R"+ CHR$(27)+"(s16H"+ CHR$(205)+ CHR$(8)+ CHR$(27)+"&a+.05R"+ " "
    euro="C"+CHR$(8)+CHR$(27)+"&a-.05R"+ CHR$(27)+"(s16H"+ CHR$(205)+ CHR$(8)+ CHR$(27)+"&a+.05R"+ CHR$(27)+"(s10H"+ CHR$(27)+"(8U"+" "
    euro2="C"+CHR$(8)+CHR$(27)+"&a-.07r-.08C"+CHR$(27)+"(s16H"+CHR$(27)+"(10U"+CHR$(205)+CHR$(8)+CHR$(27)+"&a+.07r+.08C"+CHR$(27)+"(s10H"+CHR$(27)+"(8U"+" "

    LPRINT "this is a "euro" sign. "
    LPRINT "And this is the enhanced one: "euro2
    LPRINT CHR$(12);
    END FUNCTION
    '  - letter C
    '<chr8>  - backspace
    '<chr27>&a-.1R - UP one-tenth OF a LINE
    '<chr27>(s16H - switch TO 16cpi font TO reduce size OF crossbars
    '<chr27>(10U  - switch TO PC-8 character SET
    '<chr205> - type character 205 IN PC-8 character SET (two horizontal lines)
    '<chr8> - backspace
    '<chr27>&a+.1R - DOWN one-tenth OF a LINE
    '<chr27>(s10H - switch back TO 10cpi font
    '<chr27>(8U - switch back TO Roman8 character SET
    '<32> - type a space

    Any other suggestions are welcome!

    Regards,

    Henk


    ------------------
    Henk Broekhuizen,
    [email protected]
    The Netherlands

    [This message has been edited by Henk Broekhuizen (edited November 17, 2001).]

    Leave a comment:


  • Don Ward
    replied
    Originally posted by David J Walker:
    Easy enough on-screen in DOS, just edit one of the less
    used characters in the screen font. I am currently working (or
    thinking about working..) out a method for printing out of DOS.
    However, it is unlikely that I will support many printers, H-P,
    Epson & Canon BJ are the only types I currently do graphics for.
    Getting the information for this stuff is like pulling teeth.

    David, I have been trying to locate the screen font in DOS.
    I wrote a program to print landscape using the screen font but
    I had to get this by printing a character at the top of the screen
    and using the graphics GET to get a bit map. Could you let know
    where to access the font?
    Thanks, Don

    to

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

    Leave a comment:


  • stephane fonteyne
    Guest replied
    Henk,
    Are you Nederlander or Belgium?
    Do you have an emailadres, if yes can you email me:
    to [email protected]

    Greetz
    Stephane


    ------------------
    ICQ: 123632482

    Leave a comment:


  • Henk Broekhuizen
    replied
    Thanx for reacting. The main problem was printing, so if you have a solution in the future I think lots of people would speak out your name with admiration for the next years, as they do with the guy who gave us PowerBASIC <grin>.

    Regards,

    Henk


    ------------------
    Henk Broekhuizen,
    [email protected]

    Leave a comment:


  • Amos Vryhof
    Guest replied
    I have completed a DOS-Mode screen font library for PowerBASIC.

    I know I can get the € to show on the screen, but as for printing,
    I don't know enough about sending info to the printer to do this.

    If I learn more, I will write a nice free library which includes
    printer functions.

    Amos

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

    Leave a comment:


  • Henk Broekhuizen
    replied
    And David . . . is you have a solution I know some people
    who are happy to beta-test that solution or you <grin>.

    May be the solution is also something for PowerBASIC Inc to
    publish on their site if it is a solution for many, since
    PBforDOS in 9 EU countries cannot be longer used for programs
    which print currency, like factor/bill/programs.

    Thanx again guys!

    Henk


    ------------------
    Henk Broekhuizen,
    [email protected]

    Leave a comment:

Working...
X