I have been playing a little with PB to get a very small file size.
I made a little editor (no saving/loading) just to test filesize.
it compiles to 14.0 kb and can be compressed with UPX to 7.0 kb. Compressed with FSG it gets down to 6.63 kb.
How to get it smaller? is there any way?
I got the example from Fasm Windows package, and wrote it in PB.
I dont want another compressor, but i want to have the compiled file size down. It is a very small size, but can it be any smaller?
here it is:
Code: Select all
mywin= OpenWindow(Win, 300, 191, 256, 256, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "MiniPad")
CreateGadgetList(mywin)
EditorGadget(edi, 0, 0, 256, 256)
CreateMenu(1,mywin)
MenuTitle("File")
MenuItem(1,"New")
MenuBar()
MenuItem(2,"Exit")
MenuTitle("Help")
MenuItem(3,"About")
Repeat
Select WaitWindowEvent()
Case #PB_Event_SizeWindow
ResizeGadget(edi,0,0,WindowWidth(),WindowHeight())
Case #PB_Event_CloseWindow
JMP l_a
Case #PB_Event_Menu
Select EventMenuID()
Case 1
SetGadgetText(edi,"")
Case 2
JMP l_a
Case 3
MessageBox_(mywin,"A small PB app","Minipad",MB_APPLMODAL )
EndSelect
EndSelect
Until Event = #PB_EventCloseWindow
a:
End
I dont know if goto and jmp has size differences.
Rules:
shall have 2 menu's. A "File" and a "Help"
The "File" shall have 3 items. "New", wich emptys the editor, a splitbar and a "exit" wich exits the program. The help menu shall have "About" wich displays a msgbox containing "Minipad" and "A small PB app". I chose to make it with API, because that cut a half KB off
The window shall be resizeable, and the editor shall be the same size as the form when resizing.
This is not asking other people to program for me. Take it as a little competition on who can make it smallest



