This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // print errno | |
| // | |
| // build: m68k-xelf-gcc -Wall -Wextra -O2 pth_errno.c -lpthread | |
| #include <errno.h> | |
| #include <stdio.h> | |
| #include <pthread.h> | |
| static void* thread_start_routine(__attribute__((unused)) void* data) { | |
| errno = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // print newlib struct _reent address | |
| // | |
| // build: m68k-xelf-gcc -Wall -Wextra -O2 print_reent.c -lpthread | |
| #include <reent.h> | |
| #include <stdio.h> | |
| #include <pthread.h> | |
| #define S(x) #x | |
| #define T(x) S(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (i) | |
| (/MPO) | |
| (m1,1000) | |
| (a18,1) | |
| (t1) @1 [DO] crdrerfr [LOOP] | |
| (p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int A_iocs_b_intvcs (int vector, int addr) | |
| { | |
| register unsigned int reg_d0 __asm ("d0"); | |
| __asm __volatile ( | |
| "move.l %1,d1\n\t" | |
| "movea.l %2,a1\n\t" | |
| "moveq.l #0x80,%0\n\t" | |
| "trap #15" | |
| : "=d" (reg_d0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GVRAM fast clear sample | |
| // | |
| // based on Inside X68000 p.245 C4.C | |
| #define __IOCS_INLINE__ | |
| #include <stdio.h> | |
| #include <sys/iocs.h> | |
| short *vram; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;https://x.com/kamadox/status/1950514362780991943 | |
| .include doscall.mac | |
| clr.l -(sp) | |
| DOS _SUPER | |
| move.l d0,(sp) | |
| lea $00FF0000,a0 | |
| @@: cmpi.w #$4E75,(a0)+ ;rtsを探す | |
| bne @b | |
| subq.l #2,a0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #define __DOS_INLINE__ | |
| #include <sys/dos.h> | |
| #define IOCS_OPMDRV 0xf0 | |
| int is_opmdrv_installed(void* vec) { | |
| unsigned int v = (unsigned int)vec; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // pthread mutex init/lock/unlock benchmark | |
| // by TcbnErik | |
| // Last-modified: 2025-07-13 | |
| // Copying and distribution of this file, with or without modification, | |
| // are permitted in any medium without royalty provided the copyright | |
| // notice and this notice are preserved. This file is offered as-is, | |
| // without any warranty. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import x68k | |
| @micropython.asm_m68k | |
| def bras_00(): | |
| bras(skip) # must be an error | |
| label(skip) | |
| nop() | |
| @micropython.asm_m68k | |
| def btstl_dn_ea(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dim int polyX(1000), polyY(1000) | |
| dim float tblSin(359),tblCos(359) | |
| for i=0 to 359:tblSin(i)=sin(pi(i/180#)):tblCos(i)=cos(pi(i/180#)):next | |
| screen 1,1,1,1 | |
| count=0:apg=0:vpg=0:sz=100:sizePls=1 | |
| while 1 | |
| apg=((count+1) mod 2) | |
| vpg=(1+((count+1) mod 2)) | |
| sz=sz+sizePls: if sz<10 or sz>200 then sizePls=sizePls*-1 | |
| polyCalc(count mod 360,sz) |
NewerOlder