Announcement

Collapse
No announcement yet.

DEF SEG

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

  • tim van deelen
    replied
    that's true if someone says sorry we must forgive and just
    remember we have all made mistakes in the past. the biggest
    mistake i made was not finding powerbasic sooner!

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

    Leave a comment:


  • Jerry Fielden
    replied
    There is a few who makes strange and unwanted comments, but don't
    let that bother you. When it comes to dishing out help, most here
    are pretty free with it. You might as well get your share of it.

    You've got to respect the ones who sees their mistakes and apologize
    for it.

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

    Leave a comment:


  • tim van deelen
    replied
    thank you for the help. after reading all the coments about
    mr. bush i was sorta afraid to post a topic. it's always
    nice to get just help without the strange comments.

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

    Leave a comment:


  • Jerry Fielden
    replied
    Among other uses, I like to copy Text Screens to a string.

    Code:
    DEF SEG = &HB800  ' is the starting address of a color screen.
    
    a$ = PEEK$(0, 4000)  ' will copy all text and color attributes into a$
    CLS                     ' you can clear the screen
                           ' Segment already set
    POKE$ 0, a$           ' is a fast way of putting your screen back
    
    DEF SEG                ' back to its default segment
    You would want to use DEF SEG if you wanted to BSAVE a screen to a file
    Code:
    DEF SEG = &HB800
    BSAVE "TEXT.bsa",0, 4000
    CLS                            'Clear the screen
    'Segment already set, don't need to reset it
    BLOAD "TEXT.bsa             'Put the screen back
    DEF SEG    'Reset to Default
    If you are BLOADing a screen from a file that has been saved before,
    You would want to use DEF SEG = &HB800 on it first.

    For Monochrome monitors you would use setting &HB000 instead of &HB800.

    Read about BSAVE in your manuel, it should have something about DEF SEG.




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

    Leave a comment:


  • Ian Cairns
    replied
    Michael,
    It used to be that if you had data that exceeded the size of your
    data segement, then you used DEF SEG to switch among those blocks.
    A very necessary function in some circumstances.
    regards,

    ------------------
    [email protected]

    Leave a comment:


  • Michael Mattias
    replied
    DEF SEG is only used to set up conditions used by other functions such as PEEK, POKE, or VARTPR; it is a statement which has no real meaning except in those contexts.

    Yes, under MS-DOS certain system tables are always located within certain segments; however, accessing that data requires PEEK or POKE, so again, DEF SEG serves only as a 'setup' for those functions.

    MCM

    Leave a comment:


  • Tony Burcham
    replied

    Hi tim,
    Look under "Memory" in "Ralph Brown's Interrupt List". It has
    very detailed information on it. I'm using the one in WinHelp
    format.

    Tony Burcham


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

    Leave a comment:


  • tim van deelen
    started a topic DEF SEG

    DEF SEG

    I AM TRYING TO FIGURE OUT HOW TO USE DEF SEG.
    HOW DO YOU KNOW WHAT SEGMENT TO USE OR WHAT NUMBER TO USE
    WITHOUT CAUSING A PROBLEM. HOW DO YOU KNOW WHAT EACH SEGMENT
    IS USED FOR ? ANY HELP WOULD BE GREAT. THANK YOU ALL.

    ------------------
Working...
X