Breaking the barrier
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
Breaking the barrier
I have a thery that from my meager research can be proven to break the 640kb barrier that limits us, but I need a very expierenced and knowledgeable asm programmer to help me. I put the clues together: windows breaks the barrier. That's a big duh. But... when windows 95/98 start up... what do you see? DOS! That got me figuring, windows breaks the barrier, and, well, I have this hex editor that reads the hex code and converts it to asm, so therefor I could send it to an expeirenced asm programmer, look at window's code and BREAK THE BARRIER!!! Prove me right, everyone (or wronge)! I NEED HELP, THOUGH!!!
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
What's the status on FreeBasic anyways? I've been trying to find that out on qbasicnews, but there's so much freebasic stuff scattered all over the forum I'm not sure where to go to know what's going on .
Anyone here can clearly clue me in on the latest and greatest of FreeBasic?
Anyone here can clearly clue me in on the latest and greatest of FreeBasic?
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
Did you get my PM on qbasic news? if not pay a visit to the forum dude ...
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
has anyone worked with it B4G that is?
reason i'm asking is i'd like to know more about it. For instance, how does the transfer in and from memory work? how do i declare an array of more tham 640kb? is it all invisible to us? is there certain types of data types only that can be sent to and from the flat memory model? can I declare an array of UDT's and it automatically send it to where there's place? or do I have to transer something to and from?
How do I use it? do I just include a BI file? did anyone use it so far and could send me some good examples? Email side of course? at srichard@adaworld.com
Anyone?
reason i'm asking is i'd like to know more about it. For instance, how does the transfer in and from memory work? how do i declare an array of more tham 640kb? is it all invisible to us? is there certain types of data types only that can be sent to and from the flat memory model? can I declare an array of UDT's and it automatically send it to where there's place? or do I have to transer something to and from?
How do I use it? do I just include a BI file? did anyone use it so far and could send me some good examples? Email side of course? at srichard@adaworld.com
Anyone?
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
B4G -small tut.
I do work with it.
And you can get even 10mb if you want. However working with it is a bit different then with qb's. You can read and write into that memory: bytes(not in qb, but is equal to one byte STRING*1-is the closest), integers, longs, singles, doubles and strings -oh also udt(user defined types) here's small example:
before anything you need to start the basic with b4g:
and then add '$include: 'b4g.bi' in the beginning of your code.
first let's allocate some memory:
all identifiers must be of long type!Before to proceed we need to check if initalisation was successful:Now that this is done we can read/write data in it.
to read a byte: NB! you need to know the location from where to read that byte. Also location is LONG type as well to write byte to the memory is almost same, but the same way works and their opposites: Strings are a bit different, becouse you also need to know the lenght of teh string. But to write a string, you can just go as before: , but to read string back you need to specify the lenght(it is useful to get the size of the string before you push it to the memory, a=len(text$), so to read:
Using UDT's: Once you have one you can also push it to the memory and read it back later, of course memory locations is smth you need always to know, so:len(udt) gives the size in bytes of the UDT. now to read it back: Note that xMapPeekT is NOT a function. also the name udt, must be predefined with dim statament. To test, if it works you can for example null it's values before returning it from memory.
Note then when exiting you need to deinit it
Anyway this is short introduction to b4g, it's not as easy as qb's memory handling is, but it's powerful. In one memory container you can store anything you like, even write as integers, and read as string from the same location -that can be fun. There's no restriction's about what you read/write as long as you are inside the memory limit.
And you can get even 10mb if you want. However working with it is a bit different then with qb's. You can read and write into that memory: bytes(not in qb, but is equal to one byte STRING*1-is the closest), integers, longs, singles, doubles and strings -oh also udt(user defined types) here's small example:
before anything you need to start the basic with b4g:
Code: Select all
qb /l b4g.qlb 'for qb4.5
qbx /l b4gx.qlb 'for qbx 7.1
qbv /l b4gv.qlb 'for vbdos
first let's allocate some memory:
all identifiers must be of long type!
Code: Select all
Size&=&h100000 'that's 1MB 'the size we're gonna use.
buffer&=&h10000 'that's 64k buffer for mapped memory (is a lot faster)
xblk& = xmalloc(Size&) 'allocate memory
Map& = xmapmake(Buffer&) 'make a buffer.
xmap xblk&, Memory&, Map& 'create a memory map.
Code: Select all
IF (xblk& = 0) OR (Map& = 0) THEN
PRINT "Not enough memory!"
CLOSE
EXIT FUNCTION
END IF
to read a byte:
Code: Select all
byte% = xMapPeekB(xMap, offset&)
Code: Select all
xMapPokeB(xMap, offset&, value%)
Code: Select all
iInt% = xMapPeekI(xMap, offset&) 'integer
iLong& = xMapPeekL(xMap, offset&) 'long
iSingle! = xMapPeekS(xMap, offset&) 'Single
iDouble# = xMapPeekD(xMap, offset&) 'double
Code: Select all
xPokeI(xMap, offset&,iInt%) 'integer
xMapPokeL(xMap, offset&,iLong&) 'long
xMapPokeS(xMap, offset&,iSingle!) 'Single
xMapPokeD(xMap, offset&,iDouble#) 'double
Code: Select all
xMapPokeStr(xMap, offset&, text$)
Code: Select all
Text$=xMapPeekStr$(xMap, Offset&, Stringlenght%)
Code: Select all
TYPE blabla
i as integer
x as string*10
y as long
end type
dim udt as blabla
xMapPokeT(xMap, Offset&, udt, len(udt)) 'pushes content of udt to memory.
Code: Select all
xMapPeekT(xMap, Offset&, udt, len(udt))
Note then when exiting you need to deinit it
Code: Select all
xmfree Script(i).xblk
b4gdone
Sry, there are few mistakes, I mostly ripped the code from my prjc.
one, if is mapped memory then:
Hope it's useful.
one, if is mapped memory then:
also exiting you need to xblk <-the name you used all along, not script(i)...xMapPokeI(xMap, offset&,iInt%) '<---integer
xMapPokeL(xMap, offset&,iLong&) 'long
xMapPokeS(xMap, offset&,iSingle!) 'Single
xMapPokeD(xMap, offset&,iDouble#) 'double
Hope it's useful.
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
so then I initalize everything,
Use xMapPoke____ (where ____ is the data type I want to storee). to store everything I need.
I assume I do that in a loop for an array?
And then I could use xMapPeek____ (datatype) to read them back? into what? a variable of the valid type I presume?
Then I unintialize everyhting I initialized at the end to restore things the way the were...and I'm done?
Use xMapPoke____ (where ____ is the data type I want to storee). to store everything I need.
I assume I do that in a loop for an array?
And then I could use xMapPeek____ (datatype) to read them back? into what? a variable of the valid type I presume?
Then I unintialize everyhting I initialized at the end to restore things the way the were...and I'm done?
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
Re: Breaking the barrier
eh? ever heard of ems and xms?Nathan1993 wrote:I have a thery that from my meager research can be proven to break the 640kb barrier that limits us, but I need a very expierenced and knowledgeable asm programmer to help me. I put the clues together: windows breaks the barrier. That's a big duh. But... when windows 95/98 start up... what do you see? DOS! That got me figuring, windows breaks the barrier, and, well, I have this hex editor that reads the hex code and converts it to asm, so therefor I could send it to an expeirenced asm programmer, look at window's code and BREAK THE BARRIER!!! Prove me right, everyone (or wronge)! I NEED HELP, THOUGH!!!
I have no sig.
Each GFX card uses its own version of ASM to communicate with the card itself...
The card is mapped on 4gb+ memory, which is unaccessible by QB, as QB can only handle 32bit integers max (32bit = 4gb)
Almost no manufacturer release their cards specifications so you can make your own drivers.
To prevent from malicious use of their cards..
In other words, their cards have sucky error handling and can be abused to fry your computer... they don't want the lawsuits...
simple...
Anyways, wait for FreeBASIC, or move on to VB with DX... sadly, it's the only thing you can do...
I have wanted to do what you're talkinga bout, did lots of research.. but it's not possible... sadly...
The card is mapped on 4gb+ memory, which is unaccessible by QB, as QB can only handle 32bit integers max (32bit = 4gb)
Almost no manufacturer release their cards specifications so you can make your own drivers.
To prevent from malicious use of their cards..
In other words, their cards have sucky error handling and can be abused to fry your computer... they don't want the lawsuits...
simple...
Anyways, wait for FreeBASIC, or move on to VB with DX... sadly, it's the only thing you can do...
I have wanted to do what you're talkinga bout, did lots of research.. but it's not possible... sadly...
I have left this dump.
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
I could teach you ......
Been programming in VB since it first came out for windows 12 years ago
Oh GAWD!!!! that's not helping my hiding my age here...lol....Nek? we really that damn old???
I better call my bank and have them STOP the payments on those reality checks....LOL
Been programming in VB since it first came out for windows 12 years ago
Oh GAWD!!!! that's not helping my hiding my age here...lol....Nek? we really that damn old???
I better call my bank and have them STOP the payments on those reality checks....LOL
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com