Thinking about buying PureBasic, a few questions

Just starting out? Need help? Post your questions and find answers here.
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Fangbeast wrote:2. An extremely clever programer is making a RAD type IDE and project tool but even he says he has bitten off a lot and has no delivery date but have a look at what we can look forward to anyway.

http://www.woken.com
Didn't know about that! :shock: Very impressive!! :!: :!:
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
ToastEater
User
User
Posts: 49
Joined: Tue Jul 25, 2006 5:07 pm

Post by ToastEater »

ToastEater wrote:

Code: Select all

hey.s = "hey"
*hm = @hey
MOV Ebx,*hm
MOV byte [Ebx],108
MOV byte [Ebx + 4],32
MOV byte [Ebx + 1],111
MOV byte [Ebx + 5],112
MOV byte [Ebx + 6],98
MOV byte [Ebx + 2],118
MOV byte [Ebx + 3],101
Debug Ebx ; buuuuuhuu only pointer :-)
Debug hey ; This what we really want :)
nobody even comment my code is it to harsh with ya or you just think im a nut ? :roll:
Sorry for my damn english
amour au PB et au traducteur de google d'ofcourse
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

well, it's asm, and only a select few know what it is all about...

(i certainly don't, although i'd love to, sigh)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
ToastEater
User
User
Posts: 49
Joined: Tue Jul 25, 2006 5:07 pm

Post by ToastEater »

Well you can try run it and see what happens :-) not harming anything
Sorry for my damn english
amour au PB et au traducteur de google d'ofcourse
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Post by Henrik »

Toast You should zero terminate it, or a nasty guy would do this

Code: Select all

hey.s = "hey you? Not really"
*hm = @hey
MOV Ebx,*hm
MOV byte [Ebx],108
MOV byte [Ebx + 4],32
MOV byte [Ebx + 1],111
MOV byte [Ebx + 5],112
MOV byte [Ebx + 6],98
MOV byte [Ebx + 2],118
MOV byte [Ebx + 3],101
;MOV byte [Ebx + 7],0
Debug Ebx ; buuuuuhuu only pointer :-)
Debug hey ; This what we really want :) 
Henrik
ToastEater
User
User
Posts: 49
Joined: Tue Jul 25, 2006 5:07 pm

Post by ToastEater »

Henrik wrote:Toast You should zero terminate it, or a nasty guy would do this

Code: Select all

hey.s = "hey you? Not really"
*hm = @hey
MOV Ebx,*hm
MOV byte [Ebx],108
MOV byte [Ebx + 4],32
MOV byte [Ebx + 1],111
MOV byte [Ebx + 5],112
MOV byte [Ebx + 6],98
MOV byte [Ebx + 2],118
MOV byte [Ebx + 3],101
;MOV byte [Ebx + 7],0
Debug Ebx ; buuuuuhuu only pointer :-)
Debug hey ; This what we really want :) 
Henrik
Sorry i forgot just wrote it fast :S
Between is there other ways get pointer with asm ? seems for me wierd to make a long as pointer first :S
Sorry for my damn english
amour au PB et au traducteur de google d'ofcourse
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Post by Henrik »

Hi Toast, i forgot to say: You were storeing bytes in unallocated space
hey.s = "hey" is 4 bytes - [ h, e, y and 0 ]
but you were storeing 3 bytes beyond your allocation, thats not "healthy" you could be overwriting something.

Well i really don't know anything about asm, but..

Code: Select all

 ; hey.s = Space(8)

hey.s = "hey you?"

 MOV Ebx, hey.s
 MOV byte [Ebx],108
 MOV byte [Ebx + 4],32
 MOV byte [Ebx + 1],111
 MOV byte [Ebx + 5],112
 MOV byte [Ebx + 6],98
 MOV byte [Ebx + 2],118
 MOV byte [Ebx + 3],101
 MOV byte [Ebx + 7],0

Debug hey ; This what we really want :)

Code: Select all

*hey = AllocateMemory(10)

MOV Ebx, *hey
MOV byte [Ebx],73
MOV byte [Ebx +1],32
MOV byte [Ebx +2],108
MOV byte [Ebx + 6],32
MOV byte [Ebx + 3],111
MOV byte [Ebx + 7],112
MOV byte [Ebx + 8],98
MOV byte [Ebx + 4],118
MOV byte [Ebx + 5],101
MOV byte [Ebx + 9],0

Debug PeekS(*hey,10) ; This what we really want :) 
Best Henrik.
ToastEater
User
User
Posts: 49
Joined: Tue Jul 25, 2006 5:07 pm

Post by ToastEater »

Henrik wrote:Hi Toast, i forgot to say: You were storeing bytes in unallocated space
hey.s = "hey" is 4 bytes - [ h, e, y and 0 ]
but you were storeing 3 bytes beyond your allocation, thats not "healthy" you could be overwriting something.

Well i really don't know anything about asm, but..

Code: Select all

 ; hey.s = Space(8)

hey.s = "hey you?"

 MOV Ebx, hey.s
 MOV byte [Ebx],108
 MOV byte [Ebx + 4],32
 MOV byte [Ebx + 1],111
 MOV byte [Ebx + 5],112
 MOV byte [Ebx + 6],98
 MOV byte [Ebx + 2],118
 MOV byte [Ebx + 3],101
 MOV byte [Ebx + 7],0

Debug hey ; This what we really want :)

Code: Select all

*hey = AllocateMemory(10)

MOV Ebx, *hey
MOV byte [Ebx],73
MOV byte [Ebx +1],32
MOV byte [Ebx +2],108
MOV byte [Ebx + 6],32
MOV byte [Ebx + 3],111
MOV byte [Ebx + 7],112
MOV byte [Ebx + 8],98
MOV byte [Ebx + 4],118
MOV byte [Ebx + 5],101
MOV byte [Ebx + 9],0

Debug PeekS(*hey,10) ; This what we really want :) 
Best Henrik.
Yea I know i also did last time i wrote the code looks so much more nicer.
But aren't it a fixed string so i should automatic allocate the string longer or im completly wrong ?
Sorry for my damn english
amour au PB et au traducteur de google d'ofcourse
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Re: Thinking about buying PureBasic, a few questions

Post by mskuma »

MaxNorris wrote:MoleBox - I use this mostly just for packaging... anyone have experience with MoleBox and PB?
Just offering some feedback since I was just trying MoleBox for the first time, and so far very impressed - almost a no-brainer (simple) to use and it works (at least for my test project with dozens of images and a sound file). It operates on the finished EXE so it's totally independent of PB. I guess the price is worth it(?) especially if you want to bundle your DLL(s) with the EXE as well (which seems to be its selling point..).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

>> One of the things y'all forgot to mention is that we have a fantastic support community
>
> Probably the best feature IMO

Yep. And the community is pretty much mature and friendly, too. There's
been a few times when flame wars break out, and people have insulted
and abused each other, but everyone always forgives in the end. I know
from personal experience. ;) It's a great place to be part of.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Pssst, PB...*me whispers..) You are replying to a post from 2006!! Run now, I won't tell anyone!!!
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Damn, I am too! But this thread showed up from the "Show new posts from
last visit" link, so there must be a bug in the forum somewhere. Interesting!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Fangbeast wrote:Pssst, PB...*me whispers..) You are replying to a post from 2006!! Run now, I won't tell anyone!!!
:lol: :lol: :lol:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
idle
Always Here
Always Here
Posts: 5839
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

must be a glitch the thread was just of the same title.

:lol:
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

PB wrote:Damn, I am too! But this thread showed up from the "Show new posts from
last visit" link, so there must be a bug in the forum somewhere. Interesting!
Couldn't help myself. Needed something to lighten the mood around here.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Post Reply