Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

call outside of TURBO-POWER-Q-BASIC program

nbucskanbucska Member Posts: 1
Is it possible under DOS to load a memory resident
program outside of the BASIC program or inside of
an array and CALL it ?

How can I get the memory map?

Comments

  • poetfreakpoetfreak Member Posts: 68
    : Is it possible under DOS to load a memory resident
    : program outside of the BASIC program or inside of
    : an array and CALL it ?
    :
    : How can I get the memory map?
    :
    :
    yeah, load the code with data statements into a string then CALL it using the current dataseg at the varptr. This example is only two instructions, INT 5 which calls printscreen under dos so to use it you
    have to have a printer hooked up. I hope I remember this right :)

    10 read a:if a=0 then 20
    15 a$=a$+chr$(a): goto 10
    20 def seg=
    21 REM that is different under differnt basics
    25 a=varptr(a$)
    30 call a
    35 end
    90 data 205,5, 0

    Either way you should get the idea. I might need a return instruction there but I don't remember. If it crashes, I did :P Run this in dos mode so you don't lose anything.

  • poetfreakpoetfreak Member Posts: 68
    10 read a:if a=0 then 20
    15 a$=a$+chr$(a): goto 10
    20 def seg = varseg(a$) 'point memory segment to varible segment -DUH
    25 a=varptr(a$) 'And offset to the mem address of the varible
    30 call (a) 'maybe call absolute a ???
    35 end
    90 data 205,5, 0

    : Either way you should get the idea. I might need a return instruction there but I don't remember. If it crashes, I did :P Run this in dos mode so you don't lose anything.
    :
    :

  • poetfreakpoetfreak Member Posts: 68
    : Is it possible under DOS to load a memory resident
    : program outside of the BASIC program or inside of
    : an array and CALL it ?
    :
    : How can I get the memory map?
    :
    :
    Most everything you probably want is in peekpoke.zip somewhere in the hardware files here, if that does cover it dig up the assembly language interrupt guide (do some searching for this). Between the two if you understand the varseg, varptr call , call absolute and interrupt commands for your particular brand of basic then there is nothing you can't incorporate.
Sign In or Register to comment.