New compilers very soon from PowerBASIC.

Started by hutch--, January 22, 2011, 11:57:47 PM

Previous topic - Next topic

hutch--

PowerBASIC have recently announced on their web site that they will start shipping their two new compilers in a reasonably short time. As soon as it is released I will try and get the technical data for the new capacities so that everyone interested can have a look at it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

japheth

Quote from: hutch-- on January 22, 2011, 11:57:47 PM
PowerBASIC have recently announced on their web site that they will start shipping their two new compilers in a reasonably short time. As soon as it is released I will try and get the technical data for the new capacities so that everyone interested can have a look at it.

Many thanks for this decent advertisement! 
I always was a big admirer of the Beginner's All-purpose thingy.

:toothy

hutch--

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--

 :bg

INTRODUCTION TO BASIC

I inflated the disk size so it did not come in at 6144 bytes. Don't want to make the C runtime libraries look as bloated as they are.  :P


' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

MACRO WILLKOMMEN_BEI_BASIC = FUNCTION PBmain as LONG
MACRO ANKUNDIGUNG = MSGBOX
MACRO AUFBLASEN_ME_LIKE_C = #BLOAT
MACRO AUF_WIEDERSEHEN = End FUNCTION

' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

AUFBLASEN_ME_LIKE_C 1024 * 28   ' ADD 28K TO MATCH C RUNTIME SIZE
WILLKOMMEN_BEI_BASIC
0000:ANKUNDIGUNG "ONE ZWEI DREI VIER FUNF SECHS SIEBEN ACHT NEUN ZEHN",0,"JAPHETH ERA BASIC"
AUF_WIEDERSEHEN

' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

i'm having trouble, too, Hutch...
        Yo ho ho  eax,ebx

Quoteerror A2008: syntax error : ho

no ho, here
oddly enough, it didn't seem to mind Yo - lol

TmX

Quote from: hutch-- on January 29, 2011, 12:33:47 AM
:bg

INTRODUCTION TO BASIC

I inflated the disk size so it did not come in at 6144 bytes. Don't want to make the C runtime libraries look as bloated as they are.  :P


' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

MACRO WILLKOMMEN_BEI_BASIC = FUNCTION PBmain as LONG
MACRO ANKUNDIGUNG = MSGBOX
MACRO AUFBLASEN_ME_LIKE_C = #BLOAT
MACRO AUF_WIEDERSEHEN = End FUNCTION

' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

AUFBLASEN_ME_LIKE_C 1024 * 28   ' ADD 28K TO MATCH C RUNTIME SIZE
WILLKOMMEN_BEI_BASIC
0000:ANKUNDIGUNG "ONE ZWEI DREI VIER FUNF SECHS SIEBEN ACHT NEUN ZEHN",0,"JAPHETH ERA BASIC"
AUF_WIEDERSEHEN

' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤


#BLOAT is cute... how to do that in MASM?

:toothy

hutch--

Easy,

\masm32\examples\example09\bloat\hllemu.asm
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

japheth

Quote from: dedndave on January 29, 2011, 01:37:50 AM
oddly enough, it didn't seem to mind Yo - lol

JWasm is more strict:


     Yo ho ho  eax,ebx


CODE317.ASM(5) : Error A2211: Syntax error: Yo
CODE317.ASM: 9 lines, 1 passes, 0 ms, 0 warnings, 1 errors

hutch--

 :bg

i am surprised at the level of social deprevation when persons are unaware of the origin of the expression "yo ho ho".


Robert Lewis Stevenson
Treasure Island 1901

Fifteen men on a dead man's chest
Yo ho ho and a bottle of rum
Drink and the devil had done for the rest
Yo ho ho and a bottle of rum.


Since you guys clearly don't have the parser for it, here is another bloated pig in PB at 6656 bytes.


' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

FUNCTION PBmain as LONG

  msgbox chr$( _
    "Fifteen men on a dead man's chest",13,10,_
    "Yo ho ho and a bottle of rum",13,10,_
    "Drink and the devil had done for the rest",13,10,_
    "Yo ho ho and a bottle of rum.",13,10),0,"Yo ho ho"

End FUNCTION

' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jj2007

Quote from: hutch-- on January 29, 2011, 11:28:54 PM
Since you guys clearly don't have the parser for it, here is another bloated pig in PB at 6656 bytes.

Hutch,

Your code gave me a few syntax errors, but now it works, at 1024 bytes :bg

include \masm32\include\masm32rt.inc
.code
start:

MsgBox 0, chr$(\
    "Fifteen men on a dead man's chest",13,10,\
    "Yo ho ho and a bottle of rum",13,10,\
    "Drink and the devil had done for the rest",13,10,\
    "Yo ho ho and a bottle of rum.",13,10),"Yo ho ho", MB_OK

exit
end start

hutch--

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jj2007


hutch--

> Masm, Basic, where is the difference

Thats why I said i can do it in MASM too.

Take the compliment on your language interface design though, it appears to work well.

With PB you pick up the overhead of a dynamic string engine and a number of other capacities for the 6k startup but then it is a compiler, not an assembler and it has a built in run time library that has a massive capacity s you use and include more of it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--

Now try this in C++, genuine 80 bit floating point, not the normal C runtime limit of 64 bit. 7680 bytes in basic with its default runtime library. All I have to do is force you to use any C runtime function and your size explodes.


' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

FUNCTION PBmain as LONG

    LOCAL fvar as EXTENDED      ' 80 bit FP
    LOCAL azTxt as ASCIIZ * 32

    fvar = 1234.567890123456

    azTxt = format$(fvar * (9876.54321098765 / 1029.564738291092))

    msgbox azTxt,0,"80 bit FP"

End FUNCTION

' ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--

Alex,

All I need to do is look at the Microsoft PE specifications and the minimum size for a valid PE file is 2 x 512 byte sections, 1024 bytes. I have seen hand coded hex PE files under 200 bytes but they are not valid 32 bit PE files, they are just non-functional oddities that may not crash all Windows versions.

Reference Microsoft PECOFF.DOCX
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php