Skip to content

Commit b6cef35

Browse files
committed
Merge branch 'header-fixes'
2 parents 461f7a1 + 04b9795 commit b6cef35

File tree

7 files changed

+250
-23
lines changed

7 files changed

+250
-23
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3535
- uses: actions/checkout@v4
3636

37+
- name: Install prerequisites
38+
run: |
39+
pip3 install -r requirements.txt
40+
3741
- name: Build the library
3842
run: |
3943
make

create_hfiles.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44

55
set -e
66

7-
for i in oslib/include/*.h ; do
7+
for i in oslib/include/*.h oslib/Macros/header oslib/Types/header ; do
8+
name=$(basename "$i")
9+
if [[ "$i" == 'oslib/Macros/header' ]] ; then
10+
name="macros.h"
11+
elif [[ "$i" == 'oslib/Types/header' ]] ; then
12+
name="types.h"
13+
fi
814
env LC_ALL=C sed -E -e '/__swi[^;]*$/,/;/ s/^/\/\//' \
915
-e '/__swi.*;$/ s/^/\/\//' \
1016
-e 's/([ (])int /\1int32_t /' \
1117
-e 's/unsigned int32_t/uint32_t/' \
1218
-e 's/typedef int32_t *bool;/#include <stdbool.h>/' \
1319
-e '3i #include <stdint.h>' \
1420
< "$i" \
15-
> "include/$(basename "$i")"
21+
> "include/$name"
1622
done

create_sfiles.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ set -e
66

77
for n in oslib/*/def/* ; do
88
nb=$(basename "$n")
9-
# Exclude non-working files
10-
if [[ "$nb" = 'joystick' ]] ; then
11-
continue
12-
fi
9+
# Exclude non-working files (everything seems to be working now!)
10+
#if [[ "$nb" = 'nothing' ]] ; then
11+
# continue
12+
#fi
1313
python oslib_parser.py --oslib-dir oslib/ \
1414
"$n" \
1515
--create-aarch64-api "src/$nb.s"

oslib/Computer/def/joystick

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CONST
2727
Joystick_HalfWordYShift = .Int: 16;
2828
SWI Joystick_ReadHalfWord =
2929
( NUMBER 0x43F40 "Returns the state of a joystick",
30-
ENTRY (R0 | .Int: joystick_no, R0 # %100000000),
30+
ENTRY (R0 # %100000000, R0 | .Int: joystick_no),
3131
EXIT (R0! = Joystick_HalfWordState: state, R1 = .Bits: switches)
3232
);
3333

0 commit comments

Comments
 (0)