Search found 62 matches

by nedman47
Oct 24, 2010 20:47
Forum: DOS
Topic: shell or exec string length limit ?
Replies: 5
Views: 2729

shell or exec string length limit ?

trying to run a command line email program called blat using shell or exec. it works with short test args but gives a return code of -1 if the arg string gets long enough to be useful. Shell "blat " & _ " -body " & mfile & _ " -to " & mto & _ " ...
by nedman47
Jan 13, 2009 16:29
Forum: DOS
Topic: kill deletes read-only file
Replies: 16
Views: 7360

kill deletes file

can you give details of how to read file attributes before using kill ?
by nedman47
Jan 13, 2009 12:16
Forum: DOS
Topic: kill deletes read-only file
Replies: 16
Views: 7360

kill deletes read-only file

kill can delete a file marked read-only.

i would think that is a bug.

i am using dos version 0.20.
by nedman47
Jan 12, 2009 19:16
Forum: DOS
Topic: file attributes
Replies: 2
Views: 1868

file attributes

I am trying to use the DJGPP function _dos_getfileattr to tell me if a file is marked as read only but all I get back is zero.

Code: Select all

#include "dos/dos.bi"
dim as uinteger ptr fa
_dos_getfileattr("z.z",fa)
print *fa
by nedman47
Nov 23, 2008 17:26
Forum: DOS
Topic: @ in command
Replies: 1
Views: 1708

@ in command

I prefer to handle indirection myself and want to turn off processing of @ in command. Can that be done?

By default @z.z is expanded so that all the lines of file z.z are substituted with the space as the separator unless z.z does not exist.

Thanks in advance.
by nedman47
Dec 15, 2007 21:29
Forum: DOS
Topic: turning the cursor off
Replies: 4
Views: 2635

i found a workaround for this issue

i added a 150 ms delay before turning off the cursor ...

Code: Select all

sleep 150
locate ,,0


a delay of 100 ms works sometimes but 150 works every time
by nedman47
Oct 18, 2007 13:45
Forum: DOS
Topic: turning the cursor off
Replies: 4
Views: 2635

locate ,,1 has no effect.

here is a complete program that shows the problem. the first time you run it, the cursor is off. on subsequent runs, the cursor remains on.

Code: Select all

locate ,,0
cls
locate 10,15
print "hello world"
dim k as integer
k = getkey
locate ,,1
by nedman47
Oct 14, 2007 15:03
Forum: DOS
Topic: turning the cursor off
Replies: 4
Views: 2635

turning the cursor off

i'm developing a program that puts a menu of items on the screen and provides its own block cursor, so it begins by clearing the screen and turning off the cursor with LOCATE ,,0. i noticed that the cursor did not always turn off. upon further investigation i found that it turns off the cursor the f...
by nedman47
May 04, 2007 19:29
Forum: General
Topic: How to use gprof?
Replies: 10
Views: 2300

sorry ... where?
by nedman47
May 04, 2007 18:31
Forum: General
Topic: How to use gprof?
Replies: 10
Views: 2300

did the win32 version of gprof get posted to the freebasic website? if so, where is it?
by nedman47
May 01, 2007 13:47
Forum: DOS
Topic: __dpmi_int
Replies: 8
Views: 4064

here are some profiler results that might help

'open for input' version
calls fb_Dev_FileRead
no mention of __dpmi_int or fread

'open for binary' version
__dpmi_int
__dj_movedata
fread
by nedman47
May 01, 2007 11:47
Forum: DOS
Topic: __dpmi_int
Replies: 8
Views: 4064

consider this program open "n:\mail\28800000\junk.pmm" for input as #1 dim x as string x = space(lof(1)) get #1,,x the file is about 300 megs. the program runs very quickly. but if you change INPUT to BINARY the program runs 10 times slower and the profile shows calls to __...
by nedman47
Apr 30, 2007 23:08
Forum: DOS
Topic: __dpmi_int
Replies: 8
Views: 4064

i wrote a small demo program to experiment with the profiler. it turns out that OPEN INPUT is fine. it's only OPEN BINARY that has this extreme slowness and the real mode calls.

can someone explain the difference between the implementation of INPUT vs BINARY?
by nedman47
Apr 30, 2007 15:43
Forum: DOS
Topic: __dpmi_int
Replies: 8
Views: 4064

__dpmi_int

i was rewriting an old qb45 program in freebasic. the program checks all the maildirs on a netware volume to remove expired pegasus mail. in other words it does a lot of disk i/o. the program runs about 4 times slower in freebasic than in qb45. i did a profile and discovered the program is spending ...
by nedman47
Apr 28, 2007 23:36
Forum: DOS
Topic: type and get
Replies: 3
Views: 2281

type and get

i have a file with a 118 byte record, which i was reading into a type structure in qb45. when i translated the program into freebasic (dos version) the fields do not line up properly. type imessage f1 as ulong, f2 as ulong f3 as short, f4 as string * 14, f5 as string * 30, f6 as string * 36, f7 as s...

Go to advanced search