Search found 849 matches

by grindstone
Jan 13, 2017 8:48
Forum: DOS
Topic: How detect memory leak / overflow
Replies: 4
Views: 2111

Re: How detect memory leak / overflow

Hm... Maybe you could try to call the freedos - statement MEM via the FB - SHELL - command? Only a suggestion. No clue if it works.
by grindstone
Jan 13, 2017 8:29
Forum: Hardware Interfaces / Communication
Topic: Specialty serial program
Replies: 24
Views: 18409

Re: Specialty serial program

In my input code, 'input "Port:',newPort', the expected input should be "XXXX", meaning that it is a string, in quotes. Is their a way to take in XXXX and have that converted to "XXXX", a string to be sent. There is more than one place now where I have to keep putting somet...
by grindstone
Jan 12, 2017 13:38
Forum: Sources, Examples, Tips and Tricks
Topic: findAndReplace function
Replies: 21
Views: 2781

Re: findAndReplace function

Not sure how to do this is ASM because the output string may be bigger or smaller than the input string. For that you have to calculate and allocate the theoretically maximal amount of memory before replacing the string. Afterwards you can resize it to the real length. I recoded your function, in F...
by grindstone
Jan 12, 2017 11:35
Forum: DOS
Topic: How detect memory leak / overflow
Replies: 4
Views: 2111

Re: How detect memory leak / overflow

Hello Cpcdos!

Put the statement FRE into your program at an appropriate place, let the program run and watch the value. If it becomes less and less and less... you probably got a memory leak.
by grindstone
Jan 12, 2017 11:24
Forum: Hardware Interfaces / Communication
Topic: Specialty serial program
Replies: 24
Views: 18409

Re: Specialty serial program

In principle you are right, but in this case it will be indifferent. In fact, it would be sufficient to dim xbee as UByte, for a file number can't be greater than 255.
by grindstone
Jan 11, 2017 13:38
Forum: Hardware Interfaces / Communication
Topic: Specialty serial program
Replies: 24
Views: 18409

Re: Specialty serial program

So, a command would look like writeStr(xbee,"Did you get this?"), instead of writeStr(#1,"Did you get this?")
Simply use variables instead of explicit numbers:

Code: Select all

Dim As Integer xbee
xbee = FreeFile
...
<open the port as #xbee>
...
writeStr(xbee,"Did you get this?")
by grindstone
Jan 09, 2017 11:20
Forum: Beginners
Topic: UTF-8 to number
Replies: 4
Views: 1001

Re: UTF-8 to number

Maybe this may work (not tested due to lack of cyrillic text file): #Include Once "utf_conv.bi" ScreenRes 800,600,32 Dim As Integer i,j,k,numberOfBytes Dim s As String Dim As ZString*2 dest, src Open "c:\russian.txt" For Input Encoding "utf-8" As #1 numberOfBytes = 1 Do...
by grindstone
Jan 05, 2017 15:11
Forum: General
Topic: How to use SAPI for speech?
Replies: 4
Views: 1373

Re: How to use SAPI for speech?

It looks like, changing the voice requires you to use "GetVoice" to find available voices That's not quite correct. "GetVoice" returns the properties of the currently used voice in a ISpObjectToken - structure. To browse the available voices (no clue if there are any by default)...
by grindstone
Jan 04, 2017 10:08
Forum: Windows
Topic: Controlling a CD/DVD drive
Replies: 3
Views: 1152

Re: Controlling a CD/DVD drive

I don't know. The only thing I ever did by myself via FB is to open and close the tray using mciSendString. For any other CD - operations I use a nice little command line program called "cdrdao". But it seems to me that both the mciSendString and the IOCTL_ method will work fine once you f...
by grindstone
Jan 04, 2017 9:47
Forum: Windows
Topic: Controlling a CD/DVD drive
Replies: 3
Views: 1152

Re: Controlling a CD/DVD drive

...and which seems not to be translated into FB.
Of course it is, although maybe only partly.

Go to http://www.freebasic.net/forum/viewtopic.php?t=23622, download and unpack the zip - file and look for "cdrom_ioctl.bi".
by grindstone
Jul 26, 2016 16:19
Forum: General
Topic: Question about a question mark??
Replies: 7
Views: 1393

Re: Question about a question mark??

The space wasn't used as delimiter in C64 code. Instead, every character sequence matching a keyword was tokenized. So you could write code like FORX%=1TO10:?X%:NEXT (without any space) and it would work. On the other hand you were not allowed to use variable names containing any keyword sequence li...
by grindstone
Jul 18, 2016 6:58
Forum: Beginners
Topic: Permission denied!
Replies: 11
Views: 2584

Re: Permission denied!

Hello and welcome to the forum.

This message occurs if you try to compile (or rather: rewrite the .exe of) a program that's currently running.
by grindstone
Jul 11, 2016 7:56
Forum: Community Discussion
Topic: What objective is being sought in the coming releases?
Replies: 53
Views: 6336

Re: What objective is being sought in the coming releases?

sancho2 wrote:I have tons of unfinished stuff that is not at a stage where it is useful and when I try to go back to it I always end up starting the whole thing from scratch. And then abandoning it once more.
Thank you! It's quite reassuring to see that I'm not the only one...;)
by grindstone
Jul 10, 2016 8:43
Forum: Beginners
Topic: Cannot find any IDE
Replies: 25
Views: 3746

Re: Cannot find any IDE

Sorry, I wasn't aware of that, I vow reform.

You're right, I'm using FBIde 1.0.7.6c myself, and as far as I remember (although I'm not sure, so many years after) it came with the FB automatic installation package.