English Amiga Board


Go Back   English Amiga Board > Search Forums

Showing results 1 to 40 of 720
Search took 0.15 seconds.
Search: Posts Made By: alkis
Forum: Coders. C/C++ 08 March 2024, 10:48
Replies: 1,549
Views: 359,632
Posted By alkis
No. See this is only for __clang__ (which emacs'...

No. See this is only for __clang__ (which emacs' eglot uses). When you do the actual compile with gcc, __clang__ is not defined.
Forum: Coders. C/C++ 07 March 2024, 21:03
Replies: 1,549
Views: 359,632
Posted By alkis
For emacs + eglot I had to do it like that ...

For emacs + eglot I had to do it like that
#ifdef __clang__
#define __stdargs
#define __aligned
#include <clib/dos_protos.h>
#include <clib/exec_protos.h>
#else
#include <proto/dos.h>...
Forum: Coders. System 28 November 2023, 23:10
Replies: 35
Views: 4,183
Posted By alkis
I'll give you my actual constraints. The code...

I'll give you my actual constraints. The code that I uploaded was the heart of a "make" command line tool, that spawns sub-tools for the compilation. So, yeah, result code was important.

Also,...
Forum: Coders. System 25 November 2023, 00:16
Replies: 35
Views: 4,183
Posted By alkis
I am not 100% sure that I understand what you...

I am not 100% sure that I understand what you need, but here is a "system" command that I used to avoid having anything like c:run available (as stated in...
Forum: Coders. General 14 October 2023, 20:26
Replies: 1,572
Views: 551,831
Posted By alkis
I thought that I already hinted this but here is...

I thought that I already hinted this but here is another try.
The microsoft compiler trips on that code. Gcc and Clang do not trip over this code. You could say microsoft compiler has a bug. I...
Forum: Coders. General 09 October 2023, 23:51
Replies: 1,572
Views: 551,831
Posted By alkis
clang, gcc do not give a warning. Neither...

clang, gcc do not give a warning. Neither m68k-amigaos-gcc.
All tried with -Wall -Wextra

How do you get a warning?
Forum: Coders. C/C++ 26 September 2023, 21:18
Replies: 5
Views: 841
Posted By alkis
I think for those you have to #include...

I think for those you have to #include <string.h>
Forum: Coders. C/C++ 14 September 2023, 21:31
Replies: 1,549
Views: 359,632
Posted By alkis
Something is not pushed to repository? with ...

Something is not pushed to repository?
with
-O2 -fomit-frame-pointer -mregparm -m68020
I get


_lsl_ubb:
and.l #255,d0
lsl.l d1,d0
rts
Forum: Coders. General 10 July 2023, 10:14
Replies: 1,572
Views: 551,831
Posted By alkis
vamos -v sieve 11:12:02.255 main: INFO:...

vamos -v sieve
11:12:02.255 main: INFO: done. exit code=0
11:12:02.255 main: INFO: total cycles: 42054466
11:12:02.256 main: INFO: vamos is exiting
Number of primes...
Forum: Coders. General 10 July 2023, 10:03
Replies: 1,572
Views: 551,831
Posted By alkis
I run the executable through vamos on linux. With...

I run the executable through vamos on linux. With -v it reports the cycles needed for the execution.
Forum: Coders. General 10 July 2023, 03:28
Replies: 1,572
Views: 551,831
Posted By alkis
I am missing something on your first suggestion. ...

I am missing something on your first suggestion. Table element is byte. How can I check 2 values with one check when using words?

For the add.l vs addq, I think they are both 8 cycles according...
Forum: Coders. General 09 July 2023, 22:14
Replies: 1,572
Views: 551,831
Posted By alkis
New clear. Movem.l 32 bytes at a time, unrolled...

New clear. Movem.l 32 bytes at a time, unrolled once to go 64bytes per loop.

lea.l guard,a0
move.w #7813-1,d5
moveq #0,d0
moveq ...
Forum: Coders. General 09 July 2023, 21:49
Replies: 1,572
Views: 551,831
Posted By alkis
Sure, I'll just put the whole thing so it can be...

Sure, I'll just put the whole thing so it can be compilable.


#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned char ptype;
Forum: Coders. General 09 July 2023, 20:03
Replies: 1,572
Views: 551,831
Posted By alkis
Not really the point, but sure here it is :) ...

Not really the point, but sure here it is :)


incdir /opt/amiga/gcc6/m68k-amigaos/ndk-include/
include exec/types.i
include exec/macros.i
include lvo/exec_lib.i
...
Forum: Coders. General 09 July 2023, 15:39
Replies: 1,572
Views: 551,831
Posted By alkis
I'll try to answer the OP question in high level....

I'll try to answer the OP question in high level.
Programming for a non-existent platform is for "fun". "Fun" is like solving the puzzle.
Assembly gives you a puzzle with more pieces than C. Some...
Forum: Coders. System 28 June 2023, 03:45
Replies: 13
Views: 1,444
Posted By alkis
This is lightly tested but seems to work in 1.3...

This is lightly tested but seems to work in 1.3 and 3.1


#include <dos/dos.h>
#include <proto/dos.h>
#include <proto/exec.h>

#include <stdio.h>

#define BUFLEN 64
Forum: Coders. System 26 June 2023, 21:55
Replies: 13
Views: 1,444
Posted By alkis
Hmm, it doesn't seem to work though. And every...

Hmm, it doesn't seem to work though. And every reference I've found on the internet is overwriting the cli->SetName in place!!!

for example...
Forum: Coders. System 29 April 2023, 19:11
Replies: 9
Views: 986
Posted By alkis
do you get any error from the compiler when you...

do you get any error from the compiler when you try to compile the sample I posted above?
Forum: Coders. System 29 April 2023, 03:15
Replies: 9
Views: 986
Posted By alkis
What do you mean you can't find this function? Do...

What do you mean you can't find this function? Do you get an error from the compiler?

Umm, this is how I compiled it with bebbo's gcc 6.5.0

m68k-amigaos-gcc -O3 -noixemul -o gvar gvar.c
Forum: Coders. System 29 April 2023, 00:13
Replies: 9
Views: 986
Posted By alkis
If you are in kickstart >=2, check this ...

If you are in kickstart >=2, check this
http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node01BF.html

sample program

#include <proto/dos.h>

int main(int argc, char...
Forum: Coders. C/C++ 26 April 2023, 21:31
Replies: 1,549
Views: 359,632
Posted By alkis
libnix fails with ...

libnix fails with

/home/alex/t/amiga-gcc13.1/projects/libnix/sources/socket/socket/addrinfo.c:6:9: error: 'asm' specifier for variable '__freeaddrinfo_ai' conflicts with 'asm' clobber list
6...
Forum: Coders. C/C++ 26 April 2023, 18:08
Replies: 1,549
Views: 359,632
Posted By alkis
You mean like that? make branch...

You mean like that?


make branch branch=amiga13.1 mod=gcc


or something else?
Forum: Coders. C/C++ 19 April 2023, 21:10
Replies: 10
Views: 1,253
Posted By alkis
Double numbers performance and some io. ...

Double numbers performance and some io.


/* The Computer Language Benchmarks Game
* https://salsa.debian.org/benchmarksgame-team/benchmarksgame/

contributed by Greg Buchholz
*/
...
Forum: Coders. C/C++ 18 April 2023, 09:35
Replies: 10
Views: 1,253
Posted By alkis
Thomas, I am pretty sure Bebbo knows what a...

Thomas, I am pretty sure Bebbo knows what a compiler is, since you know....he ported gcc to amigaos-target.

Anyways, the point of the chart is to compare compiler-produced-code from various...
Forum: Coders. General 29 March 2023, 11:27
Replies: 9
Views: 1,526
Posted By alkis
I think OP refers to that source:...

I think OP refers to that



source: https://jvaltane.kapsi.fi/amiga/howtocode/blitter.html
Forum: Coders. C/C++ 11 February 2023, 01:41
Replies: 9
Views: 1,376
Posted By alkis
Can you attach source code and/or executable?

Can you attach source code and/or executable?
Forum: Coders. C/C++ 10 February 2023, 02:57
Replies: 9
Views: 1,376
Posted By alkis
Your second invocation is the correct one. ...

Your second invocation is the correct one.

m68k-amigaos-gcc -mcrt=nix13 -o hello hello.c
if it is not recognized as executable you may have to play with c:protect in order to make the file...
Forum: Coders. C/C++ 07 February 2023, 09:11
Replies: 36
Views: 3,408
Posted By alkis
How about this? #define...

How about this?


#define GetLongFromCharStar(x) \
(((ULONG)(*(UBYTE *)x)) << 24L | ((ULONG)(*(UBYTE *)(x + 1))) << 16L | \
...
Forum: Coders. C/C++ 06 February 2023, 20:47
Replies: 36
Views: 3,408
Posted By alkis
if you want to read a long from char *, you can...

if you want to read a long from char *, you can do something like that:


#include <stdio.h>

#define GetLongFromCharStar(x) \
(((long)(*x++))...
Forum: Coders. General 06 February 2023, 14:17
Replies: 18
Views: 2,720
Posted By alkis
Here is what I used for angband. It might help. ...

Here is what I used for angband. It might help.

https://github.com/alexalkis/angband/blob/master/angband/sound-ami.c
Forum: Coders. C/C++ 04 February 2023, 20:18
Replies: 36
Views: 3,408
Posted By alkis
One thing I've noticed (and I don't have any...

One thing I've noticed (and I don't have any experience with vbcc) is that you specify -mrel which might suggest base-relative code but you link with startup.o. Usually there are different startups...
Forum: Coders. Asm / Hardware 16 January 2023, 12:01
Replies: 7
Views: 3,248
Posted By alkis
This is a version that I found on the net and had...

This is a version that I found on the net and had to retouch it in order to solve errors. I don't know if I broke it in some way, but it seems to work.

This works from version 26 up to current...
Forum: Coders. C/C++ 02 December 2022, 13:35
Replies: 15
Views: 1,710
Posted By alkis
Do something like that to your .sfd file ...

Do something like that to your .sfd file

sfdc --mode=macros whatis_lib.sfd >inline.h

This inline.h (or however you see fit name, maybe whatis_inline.h) is what you need to include.
Forum: Coders. Asm / Hardware 25 November 2022, 19:59
Replies: 14
Views: 2,802
Posted By alkis
Very nice work, thank you. Liked and...

Very nice work, thank you.
Liked and subscribed of course.
Forum: Coders. C/C++ 22 November 2022, 23:32
Replies: 94
Views: 28,103
Posted By alkis
for future reference and just in case you want to...

for future reference and just in case you want to build for 1.3 kickstart then you have to replace -noixemul with -mcrt=nix13
Forum: Coders. Asm / Hardware 17 November 2022, 00:11
Replies: 7
Views: 912
Posted By alkis
swap d0 move.w d0,d1

swap d0
move.w d0,d1
Forum: support.AmigaOS 16 October 2022, 08:56
Replies: 22
Views: 6,787
Posted By alkis
I see. That makes sense. Thanks for the...

I see. That makes sense. Thanks for the explanation.
Forum: support.AmigaOS 15 October 2022, 05:09
Replies: 22
Views: 6,787
Posted By alkis
Hmm, can't the -X & +X at the same time, by...

Hmm, can't the -X & +X at the same time, by convention, mean up wheel and -Y & +Y at the same time mean down wheel?
Forum: Coders. General 19 September 2022, 16:24
Replies: 20
Views: 4,752
Posted By alkis
Ham needs other kind of logic from current...

Ham needs other kind of logic from current implementation. I'll look into it, but no promises.
Forum: Amiga scene 01 September 2022, 19:42
Replies: 16
Views: 2,295
Posted By alkis
Arround 869 and a half :) 7090000*87/709379...

Arround 869 and a half :)

7090000*87/709379 = ~869.53518499983788637668

incdir /opt/amiga/gcc6/m68k-amigaos/ndk-include/
include devices/timer.i
include...
Showing results 1 to 40 of 720

 
Forum Jump

All times are GMT +2. The time now is 10:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.36938 seconds with 10 queries