bp7 under dos

hi.
i have a small program, which compiles ~5700 bytes. how to make it even smaller?
if i compile a program, which is only a begind-end., it's also ~1800 bytes!!!
if you have ideas (other then exe-packer, which i use, of course), please send me an email: mailto:bsh@freemail.hu
thanks!

Comments

  • : hi.
    : i have a small program, which compiles ~5700 bytes. how to make it even smaller?
    : if i compile a program, which is only a begind-end., it's also ~1800 bytes!!!
    : if you have ideas (other then exe-packer, which i use, of course), please send me an email: mailto:bsh@freemail.hu
    : thanks!
    :

    rewrite it in assembly.
    the compiler adds a lot of code necessary (for displaying runtime errors for exemple) in your program. try to reduce the stack size too. the best way would be to do it in ASM, you could have a 200byte program

  • : : hi.
    : : i have a small program, which compiles ~5700 bytes. how to make it even smaller?
    : : if i compile a program, which is only a begind-end., it's also ~1800 bytes!!!
    : : if you have ideas (other then exe-packer, which i use, of course), please send me an email: mailto:bsh@freemail.hu
    : : thanks!
    : :
    :
    : rewrite it in assembly.
    : the compiler adds a lot of code necessary (for displaying runtime errors for exemple) in your program. try to reduce the stack size too. the best way would be to do it in ASM, you could have a 200byte program
    :
    that would be not too easy. i'm not in pc assembly, although i did assembly coding on the c64. on pc, i have written some small (<100byte) demos, but that's all. i dunno how to handle external data, files, for example.
    but if you can help me, i can send you the pascal source.


  • Sure, e-mail it to me.

    I use to do the same thing with my pascal codes, I moved on to assembly when I saw how small and fast it runs.
    a lot of inline assembly will help. and there are some "hacks" you can use with the compiler too

  • : Sure, e-mail it to me.
    :
    : I use to do the same thing with my pascal codes, I moved on to assembly when I saw how small and fast it runs.
    : a lot of inline assembly will help. and there are some "hacks" you can use with the compiler too
    :

    TP adds 3-5k on every program you compile. On a bigger programs that's not noticable but when doing extremly short ones (like 'begin end.') it seam that TP is highly inefficient.
    This is not true, it's just overhead that is always there.
    There is a unit for Pascal that replaces Turbo Pascals
    SYSTEM unit and creates MUCH leaner files. It does not
    have all bells and whistles but it helps create SMALL
    exe files, comparable to what you would expect from ASM.
    What is this thing called? I don't remember. I have it
    somewhere (I think I downloaded it from this site).
    Give me a day or two to find it...

    Iby



  • Sounds interesting...

    Anyway, if you want to go to the absolute extreme in small programs then do this: Create a new file. Hold and type the number 195 on the numberic keypad. Release . Don't compile. Instead, save the file as something.com. You now have the smallest program humanly possible. It should be 1 byte long if you didn't type anything extra.

    : TP adds 3-5k on every program you compile. On a bigger programs that's not noticable but when doing extremly short ones (like 'begin end.') it seam that TP is highly inefficient.
    : This is not true, it's just overhead that is always there.
    : There is a unit for Pascal that replaces Turbo Pascals
    : SYSTEM unit and creates MUCH leaner files. It does not
    : have all bells and whistles but it helps create SMALL
    : exe files, comparable to what you would expect from ASM.
    : What is this thing called? I don't remember. I have it
    : somewhere (I think I downloaded it from this site).
    : Give me a day or two to find it...
    :
    : Iby

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories