rocker@desire.wright.edu (03/15/91)
I am finially nearing the end of a rather larger (>3500 lines) Turbo pascal 5.5 program. Throughout development, I've ran into many memory problems. Thanks to anothe UseNetter, I learned I had to put a STACKS=18,256 (was 18,128 until last week, defult is 9,??) The last thing I need to add is a backup capability. I was going to the program write and EXEC a .BAT file, but I don't think I can give EXEC enough memory. If I use $M to set heapmax low enough for EXEC, ny NEWs barf, if it's not high enough EXEC does not run, DOSERROR=8. All I have in the .BAT is three COPY *.xxx commands, anyway to do this without re-starting COMMAND.COM? This program has many varibles, both static and dynamic, and has its own timer interupt handler. Any halp is greatly appreaciated. ronnie
bb16@prism.gatech.EDU (Scott Bostater) (03/15/91)
In article <1991Mar14.154513.2859@desire.wright.edu> rocker@desire.wright.edu writes: [stuff deleted] > >The last thing I need to add is a backup capability. I was going to the >program write and EXEC a .BAT file, but I don't think I can give EXEC enough >memory. If I use $M to set heapmax low enough for EXEC, ny NEWs barf, if >it's not high enough EXEC does not run, DOSERROR=8. > On simtel20.army.mil, PD1:<MSDOS.PGMUTL>EXEC23.ZIP This swaps your program to either EMS or hard disk before doing the EXEC call. It's very similar to Ralf Brown's spawn30 routines for TC and MSC, but this one also works with TP and includes source. EXEC23 uses up a little more memory than Ralf's stuff (2K vs 1K), but then Ralf's stuff doesn't work directly with TP :-( -- Scott Bostater Georgia Tech Research Institute - Radar Systems Analysis "My soul finds rest in God alone; my salvation comes from Him" -Ps 62.1 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!bb16 Internet: bb16@prism.gatech.edu
abcscnuk@csunb.csun.edu (Naoto Kimura (ACM)) (03/20/91)
In article <24398@hydra.gatech.EDU> bb16@prism.gatech.EDU (Scott Bostater) writes: ]In article <1991Mar14.154513.2859@desire.wright.edu> rocker@desire.wright.edu ]writes: ] ][stuff deleted] ]> ]>The last thing I need to add is a backup capability. I was going to the ]>program write and EXEC a .BAT file, but I don't think I can give EXEC enough ]>memory. If I use $M to set heapmax low enough for EXEC, ny NEWs barf, if ]>it's not high enough EXEC does not run, DOSERROR=8. ]> ] ]... [stuff deleted] ] >-- ]Scott Bostater Georgia Tech Research Institute - Radar Systems Analysis Even simpler solution... Try something like: procedure CopyFile( Src, Dest: String ); const BUFSIZE = 4096; var F1,F2 : File; Buf : array [1..BUFSIZE] of byte; Count, Result : Word; begin Assign(F1,Src); Reset(F1,1); Assign(F2,Dest); Rewrite(F1,1); while not eof() do begin BlockRead(F1,Buf,BUFSIZE,Count); BlockWrite(F2,Buf,Count,Result); end; close(F1); close(F2) end; //-n-\\ Naoto Kimura _____---=======---_____ (abcscnuk@csuna.csun.edu) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !!
ts@uwasa.fi (Timo Salmi) (03/21/91)
In article <1991Mar20.111203.25495@csun.edu> abcscnuk@csunb.csun.edu (Naoto Kimura (ACM)) writes: >In article <24398@hydra.gatech.EDU> bb16@prism.gatech.EDU (Scott Bostater) writes: >]In article <1991Mar14.154513.2859@desire.wright.edu> rocker@desire.wright.edu >]writes: >] >][stuff deleted] >]> >]>The last thing I need to add is a backup capability. I was going to the >]>program write and EXEC a .BAT file, but I don't think I can give EXEC enough >]... [stuff deleted] >] >>-- >]Scott Bostater Georgia Tech Research Institute - Radar Systems Analysis > >Even simpler solution... Try something like: > >procedure CopyFile( Src, Dest: String ); ... rest of Naoto's code skipped ... If you want a similar CopyFile, complete with error checking and completion status, you'll find it in the /pc/ts/tspa23##.arc (## = 40, 50, 55, 60) TP units collection, available from our archives. ................................................................... Prof. Timo Salmi Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37 School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun