Looking for SymbOS Quigs documentation

Pagina 5/8
1 | 2 | 3 | 4 | | 6 | 7 | 8

Van Trebmint2

Master (242)

afbeelding van Trebmint2

31-08-2021, 15:45

Transfer block is an upto 16k bank of memory that makes sharing info between the app/os quicker. For instance all the data for the forms/controls is stored in the Transfer area as it is used by the app and OS. Obviously the OS sits in another 64k block to the app.
This is just an internal of Symbos you need to know if coding ASM, but Quigs tries to hide from the developer.
Quigs uses the Transfer area to hold all form/control data, plus a loading/string buffer.

Van edoz

Prophet (2392)

afbeelding van edoz

31-08-2021, 16:46

Yes, SymbOS apps can be 63k as 1 k is reserved for the multi- kernel OS. You can allocate data in Memory. But this is fixed memory which you cannot manipulate. For graphics you can load as many you want until your memory is full.
As example i set some fixed messages into the memory. If you define it between [] it means it is out of you normal 64 mapped memory. But as a programmer in Quigs you don't have to take care about that.

Var MemMes(36):String=["*",
"Please fill In all required fields and save.",
"New E-Mail message [Untitled]",
"Mail local database path/store incorrect.",
"Error In filesystem.  Error: ",
"This E-Mail was sent from my SymbOS 8-bit Z80!",
"Attached to local store: ",
"Could not access local store: ",
"Authentication Failed. Check log file.",
"Unable to reach mail-server.",
"Selected contact: ",
"No network hardware found or daemon loaded.",
"Start sending outbox E-Mails to server.",
"Only 32 Contacts are allowed.",
"To many E-mails for this folder (Max 64): ",
"TCP Connection established.",
"Trying to establish server connection: ",
"Completed all server tasks",
"Protocol error, check log files for info:",
"SymbOS E-Mail version 0.4.0",
" [ INBOX ]",
" [ OUTBOX ]",
" [ SENT ITEMS ]",
" [ DELETED ITEMS ]",
"SymbOS E-Mail was not able to process this E-Mail, Reason: To big to handle/unsupported protocol is used.",
"Please check the log files (if dumped) for more information",
"No new E-Mail(s) coming through from server.",
"No new E-Mail(s) in the outbox to send.",
"Uploading E-Mail(s) to server.",
"Fetching new E-Mail(s) from server.",
"Uploading attachment(s)",
"Downloading attachment(s)",
"Your POP3 account is locked",
" ",
"Connected closed by client",
"Sending credentials to server",
"Authentication successfully"]

My email app was my biggest app and is pushing against the limit of 64k. Now i use a different processes in SymbOS that does the base64 encoding for the email client but is in fact a "different" application. But i calling it using commandline parameters. But the best is to stay below the 63k Big smile

The Transfer block is used to exchange memory from one area to other area as you can only have 4 blocks of 16 k attached to the Z80 you need kind of memory share between them.

Every application has it's own 63k memory blocks and SymboS kernel is in fact continue switching between blocks because of the multitasking. But this happens pretty fast. Of course if applications are smaller it could be that applications are sharing a 16 k block. It is funny how multitasking is working in SymbOS.

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 17:31

edoz wrote:

Yes, SymbOS apps can be 63k as 1 k is reserved for the multi- kernel OS. You can allocate data in Memory. But this is fixed memory which you cannot manipulate.

Mmm I don't understand this part. So if you store something like Memory can't be modified? Let's supose something like this (ignore the syntax errors, still not tried Memory type):

var life:Byte=10
var memVar:Memory //Declares de Memory var
memVar.Create 1 // Reserves 1 byte to store a data
memVar.Byte.Set 0,life // Stores value 10 in memVar
life=life-1
memVar.Byte.Set life

This should update life in Memory, right?

Trebmint2 wrote:

This is just an internal of Symbos you need to know if coding ASM, but Quigs tries to hide from the developer.

This is a very strong point of Quigs!

Best regards!

Van Trebmint2

Master (242)

afbeelding van Trebmint2

31-08-2021, 17:57

AxelStone wrote:
edoz wrote:

Yes, SymbOS apps can be 63k as 1 k is reserved for the multi- kernel OS. You can allocate data in Memory. But this is fixed memory which you cannot manipulate.

Mmm I don't understand this part. So if you store something like Memory can't be modified? Let's supose something like this (ignore the syntax errors, still not tried Memory type):

var life:Byte=10
var memVar:Memory //Declares de Memory var
memVar.Create 1 // Reserves 1 byte to store a data
memVar.Byte.Set 0,life // Stores value 10 in memVar
life=life-1
memVar.Byte.Set life

This should update life in Memory, right?

Trebmint2 wrote:

This is just an internal of Symbos you need to know if coding ASM, but Quigs tries to hide from the developer.

This is a very strong point of Quigs!

Best regards!

Yes there is a Memory type. This allows you to create Memory blocks of upto 16k each.... potentially 700k+
Effectively is like a peek/poke area to store data. Its just not as quick to use as variables in direct data area.

This would be good to store large chunks of data, as long as you don't expect it to be too fast.

But yes the memory does work like that. Create a memory area upto 16k, and then
var memVar:Memory //Declares de Memory var
memVar.Create 1024 // Reserves 1 byte to store a data
for f=0 to 1023
memVar.Byte.Set f,10 // Stores value 10 in memVar
next

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 18:26

Nice, so Memory type is just what I expected, a peek / poke, very useful. One question guys, very confused about the use of []. This is used for arrays, right? I mean, if you define something like this:

Var TileTotals(16):Int=[0,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192]

This is an array, similar to your example with Strings @edoz. So regarding to your comment:

edoz wrote:

If you define it between [] it means it is out of you normal 64 mapped memory. But as a programmer in Quigs you don't have to take care about that.

Does it means that all arrays are automatically put outside of the main 64kb and managed like Memory Vars in the background?

I'm learning a lot, thanks so much!

Van Trebmint2

Master (242)

afbeelding van Trebmint2

31-08-2021, 19:53

No, vars (meaning strings,ints & bytes) are stored within the data block, so there is a maximum of 16k of data. Memory type is use when this needs to be supplemented. But Memory is slower as it has to bank switch to copy data from the 64k bank to the app 64k bank... this is a throwback to Symbos original CPC days with its limited banking.

Quigs is designed to be as fast as possible. Rather than accessing vars through a slow routine they are pointed too directly in z80. There is a file produced on every compile called sys\output which is the pure assembler that runs the app. Its actually weirdly readable and can be compared line by line to the Quigs code, if this helps.

For speed all Vars are placed with the 64k... also you can allocate this within the project settings. So an app that use little memory will be smaller in .exe size. You can allocate upto 16k, if you need more you'll have to swap it in and out of vars using the memory type.

Yes the [12,45,3,2] etc on the variable define is for more efficient look and to save memory as the compiler places the values directly into the array rather than having to do so programmatically.

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 21:35

I've noticed a very curious behaviour in SymbOS, at least MSX version: mode 512x212@16 is faster than 512x212@4. A simple test: open SymCommander at full screen and then close the window. In 16 color mode the background is redrawn really fast, in 4 color mode the redrawn is done very slow.

Tested with OpenMSX and Zemmix Neo. Any explanation for this? In theory the 4 colour mode should be faster.

Van edoz

Prophet (2392)

afbeelding van edoz

31-08-2021, 21:41

That is correct. No 16 color mode is faster as the 4 color mode is 16 color mode but real time converted to 4 color mode done with byte shifting

Van Trebmint2

Master (242)

afbeelding van Trebmint2

31-08-2021, 22:08

Yes the 4 colour mode is from the origins of Symbos on the 4 colour CPC. The MSX version is primarily 16 colour. This means any graphics created in 16 colour are automatically crunched into 4 colour so it maintains cross platform operability.

Obviously 4 colour can't be converted into 16 colour, but it works in reverse. Symbos is amazingly clever, the fact a GUI designed in 16 colours looks fine in 4 is pretty amazing.

Van AxelStone

Prophet (3055)

afbeelding van AxelStone

31-08-2021, 22:43

Thanks for the clarification guys, so if I plan to make something cross platform but using MSX as developing machine, I need to conver the sheets to 16 colour mode and for CPC version SymbOS will convert it to 4 colours.

You are right, the 4 colour mode in SymbOS looks really cool, and it's amazing that you can work directly with only 1 version of the sheets because SymbOS will downgrade to 4 colours.

Pagina 5/8
1 | 2 | 3 | 4 | | 6 | 7 | 8