Search found 71 matches
- Sun Jun 18, 2023 9:50 am
- Forum: Bug reports
- Topic: #ifndef/#define/#endif not working on z80asm if called multiple times
- Replies: 3
- Views: 1495
Re: #ifndef/#define/#endif not working on z80asm if called multiple times
Now it works fine. Thanks.
- Thu Jun 15, 2023 8:55 am
- Forum: Bug reports
- Topic: #ifndef/#define/#endif not working on z80asm if called multiple times
- Replies: 3
- Views: 1495
Re: #ifndef/#define/#endif not working on z80asm if called multiple times
All the other #define with values within the header works without any issue of duplicated.
- Thu Jun 15, 2023 8:48 am
- Forum: Bug reports
- Topic: #ifndef/#define/#endif not working on z80asm if called multiple times
- Replies: 3
- Views: 1495
#ifndef/#define/#endif not working on z80asm if called multiple times
I have a base define header with typical: #ifndef MEMMAPPER_DEFS_H_ #define MEMMAPPER_DEFS_H_ ... #endif Then have another 2 that uses it: #ifndef MEMMAPPER_TABLE_ASM_ #define MEMMAPPER_TABLE_ASM_ include "memmapper_defs.h" ... #endif #ifndef MEMMAPPER_INFO_ASM_ #define MEMMAPPER_INFO_ASM_...
- Sat Jun 10, 2023 2:33 pm
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
Is there some way to do the library get a #define value at linking with no need to recompile it? Probably not as it should be a binary for linking, but is worth to ask. As solution I could create a script to recompile the libraries and getting the defined -DVALUE=xx in compilation sentence, but if i...
- Sat Jun 10, 2023 10:27 am
- Forum: Bug reports
- Topic: zcc -I path not used by z80asm
- Replies: 2
- Views: 1265
Re: zcc -I path not used by z80asm
OK now is working. Thanks.
- Sat Jun 10, 2023 8:09 am
- Forum: Feature Requests
- Topic: z80asm add C line comment style
- Replies: 1
- Views: 1347
Re: z80asm add C line comment style
OK just realized, for those with the same problem, just put a semicolon at start of the line, so in your common C header file:
And works.
Code: Select all
;//your comment
#ifndef SOMETHING
#define SOMETHING 33
#endif
- Sat Jun 10, 2023 8:05 am
- Forum: Feature Requests
- Topic: z80asm add C line comment style
- Replies: 1
- Views: 1347
z80asm add C line comment style
I am trying to unify my definition files to avoid duplicating, it works well since z80asm included others C style directives, like #ifndef. The issue is that cannot put comments, because C uses // or *//*. It could be nice if at least z80asm would suppport one of them to be able to comment the commo...
- Sat Jun 10, 2023 8:03 am
- Forum: Bug reports
- Topic: zcc -I path not used by z80asm
- Replies: 2
- Views: 1265
zcc -I path not used by z80asm
https://github.com/z88dk/z88dk/wiki/Tool---z80asm---directives#include-filename INCLUDE "filename" Include the given file in the current assembly position. The file is searched in the path pointed by the -IPATH options. Detects and reports an attempt to recursively include the same file. ...
- Fri Jun 09, 2023 4:56 pm
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
It's been suggested that we get rid of it since it's not really needed anymore. However, it does still serve one useful purpose which is to distinguish between the entry points for variadic functions for the two compilers. OK so for normal functions is not more required. About the 2nd sentence, not...
- Fri Jun 09, 2023 3:59 pm
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
To be more precise, in both cases using or not using __LIB__ qualifer the binary is the same size, so probably the linker (that is z88dk-z80asm) already included in its linking process its new method to create libs.
But an official confirmation would be preferable, of course.
But an official confirmation would be preferable, of course.
- Fri Jun 09, 2023 3:43 pm
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
Well made my first library. Now it has changed, starting with the own z80asm: https://github.com/z88dk/z88dk/wiki/Tool---z80asm ... as librarian z88dk-z80asm -xlibrary.lib [options] file... When called with the -x option, z80asm builds a library containing all the object files passed as argument. Th...
- Wed May 31, 2023 7:36 am
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
Yes that is what I do also, but not tested yet with own library functions. Seems then that if declaring with typedef it uses the correct calling at compile time even if function pointer.
- Tue May 30, 2023 12:58 pm
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
But from a library made by yourself?
The z88dk included ones can use the trick indicated at link, that is using a wrapper, which I’d prefer to avoid.
The z88dk included ones can use the trick indicated at link, that is using a wrapper, which I’d prefer to avoid.
- Sun May 28, 2023 1:20 pm
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
Re: sccz80 allow return 8-bit values in L register
I am in the side of reading the returning value. And yes inserting LD H, 0 is what actually does, which is not a concern for me, if it was made by that way. I have no intention for having to rewrite all library functions to a new calling convention. I was interested in that if a function returns an ...
- Sun May 28, 2023 7:51 am
- Forum: Feature Requests
- Topic: Creating library documentation needs an update
- Replies: 15
- Views: 4574
Re: Creating library documentation needs an update
Well, with the main code already "finished" (only requiring some final attunement) it's time to split it into individual parts to allow smaller binary linking only the required. Let's say I have this folder structure: root | |-src | |-test I am compiling from test folder. Looking at docume...
- Sun May 28, 2023 7:23 am
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
Re: sccz80 allow return 8-bit values in L register
Could be done probably applying an autocasting to the function returning type. I think a compiler option to do that for 8-bit returning values could do the trick. Casting works nice and no matter if the functions uses HL or only L for returning values, as the issue is later when the compiled code r...
- Sat May 27, 2023 7:33 am
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
Re: sccz80 allow return 8-bit values in L register
Notice we lose extra registers if using 16-bit. Depending the situation the backup could be done in A and use DE for the check itself. Using __z88dk_sdccdecl could be used but better from the start, so don't requiring to rewrite so many functions for correctly reading parameters. Currently what I do...
- Wed May 24, 2023 10:58 am
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
Re: sccz80 allow return 8-bit values in L register
Or if you mean for reading the returning value (instead the generated code), then yes use it as 0 or simply ignore. Could be done probably applying an autocasting to the function returning type.
- Wed May 24, 2023 10:43 am
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
- Wed May 24, 2023 10:13 am
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
Re: sccz80 allow return 8-bit values in L register
This issue https://github.com/z88dk/z88dk/issues/2264 And according to __smallc calling convention, it uses HL, probably that's why I had issues when using only L for a bool return value and reading without manual casting. So seems an issue about reading the value, that the compiler assumes using HL...
- Tue May 23, 2023 2:59 pm
- Forum: Feature Requests
- Topic: sccz80 allow return 8-bit values in L register
- Replies: 12
- Views: 3170
sccz80 allow return 8-bit values in L register
I had the issue returning 8-bit values (like bool) in L not read properly by the caller, until someone noticed me that __smallc uses only HL or DEHL. It would be good if we could return 8-bit values using only L register, so the asm code could be more consistent to use with sccz80 or sdcc. Also some...
- Mon May 01, 2023 1:15 pm
- Forum: Misc
- Topic: Passing function params via registers
- Replies: 9
- Views: 2308
Re: Passing function params via registers
I recently found the intrinsic, that allow to load and store 16 bit values from/to address. Also the ones to return values using other registers. Is not worth to change all the library, then maybe it could be achieved adding intrinsic, these are the ones to load values (instead passing address) into...
- Sun Apr 30, 2023 1:05 pm
- Forum: Amstrad
- Topic: CPC Maths working again
- Replies: 19
- Views: 9498
Re: CPC Maths working again
You are my hero
I am at mobile I’ll take it a look tomorrow. Some reference to documentation or is integrated as native type?
I am at mobile I’ll take it a look tomorrow. Some reference to documentation or is integrated as native type?
- Fri Apr 28, 2023 9:34 am
- Forum: Amstrad
- Topic: CPC Maths working again
- Replies: 19
- Views: 9498
Re: CPC Maths working again
I think there is already a 8.8 library available somewhere, even if I have never used it. I do think it would be useful though, and I am guessing that Churrera is using something similar, because they have accerleration and therefore fixed point coordinates. It would depends on how good it is befor...
- Thu Apr 27, 2023 12:26 pm
- Forum: Amstrad
- Topic: CPC Maths working again
- Replies: 19
- Views: 9498
Re: CPC Maths working again
I you ask me IMHO a Fixed Point library would be a great addition. Very used for games and in format Q8.8 fits nicely in the Z80. You operate with a vector Q8.8 for iteration movement and then “apply” the integer part to your (unsigned) integer vector x,y for the integer positions of elements, prese...