Arnie97 / clock-tuner

Tweaks clock frequency of HP 39gs to play retro System RPL games
GNU General Public License v2.0
20 stars 2 forks source link

Fails to compile under Linux #2

Open sijanec opened 4 years ago

sijanec commented 4 years ago

Hello!

I run Linux kondenzator 5.3.0-59-generic #53~18.04.1-Ubuntu SMP Thu Jun 4 14:58:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux. The aplet won't compile claiming it can't open HPGCC000.000. Isn't this file supposed to be the file where the aplet will be contained?

I compiled your hp2aplet software and it seems to me that this is where the error happens.

Do you know of any way to run clock_tuner.hp on HP 39gs directly without converting it into an aplet?

This is the clock_tuner.hp file:

a@kondenzator:~/projects/clock-tuner[0]$ xxd clock_tuner.hp | head
00000000: 4850 4850 3439 2d43 2c2a 7089 084c a900  HPHP49-C,*p..L..
00000010: 8000 4850 2d47 4343 2052 4f43 4b53 2120  ..HP-GCC ROCKS! 
00000020: 6874 7470 3a2f 2f68 7067 6363 2e6f 7267  http://hpgcc.org
00000030: 2020 4850 2d47 4343 2052 4f43 4b53 2120    HP-GCC ROCKS! 
00000040: 6874 7470 3a2f 2f68 7067 6363 2e6f 7267  http://hpgcc.org
00000050: 2020 4850 2d47 4343 2052 4f43 4b53 2120    HP-GCC ROCKS! 
00000060: 6874 7470 3a2f 2f68 7067 6363 2e6f 7267  http://hpgcc.org
00000070: 2020 4850 2d47 4343 2052 4f43 4b53 2120    HP-GCC ROCKS! 
00000080: 6874 7470 3a2f 2f68 7067 6363 2e6f 7267  http://hpgcc.org
00000090: 2020 4850 2d47 4343 2052 4f43 4b53 2120    HP-GCC ROCKS! 
a@kondenzator:~/projects/clock-tuner[0]$ xxd clock_tuner.hp | tail
000043c0: 0000 8210 0000 a410 0000 d010 0000 da10  ................
000043d0: 0000 ec10 0000 3c4e 554c 4c3e 0000 2525  ......<NULL>..%%
000043e0: 3025 644c 0000 2d00 0000 2573 2573 2573  0%dL..-...%s%s%s
000043f0: 2573 0000 0000 2563 2563 2530 3364 0000  %s....%c%c%03d..
00004400: 0000 3000 0000 5072 6573 7320 4f4e 2074  ..0...Press ON t
00004410: 6f20 6578 6974 0000 0000 0000 0200 3110  o exit........1.
00004420: 0000 1d0f 0000 0100 0000 0600 0000 5008  ..............P.
00004430: 0009 0600 0000 0400 0000 2100 0000 0d00  ..........!.....
00004440: 0000 0000 0000 ffff cfc6 9c01 0000 0000  ................
00004450: 0000 4cb3 7631                           ..L.v1

And this is the clock_tuner.apt file (incomplete, of course).

a@kondenzator:~/projects/clock-tuner[0]$ xxd clock_tuner.apt
00000000: 4850 3339 4269 6e42 0b43 6c6f 636b 2054  HP39BinB.Clock T
00000010: 756e 6572 962a 3011                      uner.*0.

I had to modify lines 24 and 25 of Makefile to use forward-slashes instead of backwards-slashes.

a@kondenzator:~/projects/clock-tuner[0]$ ls
clock_tuner.apt  crt0.c     hp39kbd.c  LICENSE  main.o     s3c2410.c
clock_tuner.elf  crt0.o     hp39kbd.h  main.c   Makefile   s3c2410.h
clock_tuner.hp   display.h  hp39kbd.o  main.h   README.md  s3c2410.o
a@kondenzator:~/projects/clock-tuner[0]$ make believe
Inspecting compiler to use...
arm-elf-gcc -std=c99 -Wall -Os -I"/home/a/projects/hpgcc_20/include" -L"/home/a/projects/hpgcc_20/lib" -mtune=arm920t -mcpu=arm920t -mlittle-endian -fomit-frame-pointer -msingle-pic-base -fpic -mpic-register=r10 -msoft-float -c crt0.c -o crt0.o
arm-elf-gcc -std=c99 -Wall -Os -I"/home/a/projects/hpgcc_20/include" -L"/home/a/projects/hpgcc_20/lib" -mtune=arm920t -mcpu=arm920t -mlittle-endian -fomit-frame-pointer -c s3c2410.c -o s3c2410.o
s3c2410.c: In function 'is_valid_mpllcon':
s3c2410.c:56: warning: initialization discards qualifiers from pointer target type
s3c2410.c: In function 'freq_to_access_cycle':
s3c2410.c:94: warning: control reaches end of non-void function
arm-elf-gcc -std=c99 -Wall -Os -I"/home/a/projects/hpgcc_20/include" -L"/home/a/projects/hpgcc_20/lib" -mtune=arm920t -mcpu=arm920t -mlittle-endian -fomit-frame-pointer -c main.c -o main.o
main.c: In function 'show_system_info':
main.c:92: warning: passing argument 1 of 'clkslow_to_freq' from incompatible pointer type
main.c:98: warning: passing argument 1 of 'mpllcon_to_freq' from incompatible pointer type
main.c:111: warning: format '%08x' expects type 'unsigned int', but argument 4 has type 'struct bankcon'
main.c: In function 'show_freq_config':
main.c:150: warning: passing argument 1 of 'clkslow_to_freq' from incompatible pointer type
main.c:160: warning: passing argument 1 of 'mpllcon_to_freq' from incompatible pointer type
main.c: In function 'show_freq_confirm':
main.c:200: warning: passing argument 1 of 'clkslow_to_freq' from incompatible pointer type
main.c:202: warning: passing argument 1 of 'mpllcon_to_freq' from incompatible pointer type
main.c:204: warning: passing argument 1 of 'clkslow_to_freq' from incompatible pointer type
main.c:206: warning: passing argument 1 of 'mpllcon_to_freq' from incompatible pointer type
arm-elf-gcc -std=c99 -Wall -Os -I"/home/a/projects/hpgcc_20/include" -L"/home/a/projects/hpgcc_20/lib" -mtune=arm920t -mcpu=arm920t -mlittle-endian -fomit-frame-pointer -c hp39kbd.c -o hp39kbd.o
hp39kbd.c: In function 'get_key':
hp39kbd.c:50: warning: suggest parentheses around + or - inside shift
arm-elf-ld crt0.o s3c2410.o main.o hp39kbd.o -L"/home/a/projects/hpgcc_20/lib" -T MMUld.script -lwin -lggl -lhpg -lhplib -lgcc -o clock_tuner.elf
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/MMUglobals.o supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(exit_arm.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_intOff.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_intOn.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(gotoxy.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(printf.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(putcon.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(puts.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(vsprintf.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(write.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(dtoa.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(itoa.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(lltoa.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(strcat.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(strcpy.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(strlen.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(strncpy.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(upper.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(utoa.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(xpad.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(exit.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(malloc.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(memcpyw.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(memset.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sbrk.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_LCDSynch.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_error.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_lcdfix.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_lcdgetheight.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(fclose.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(keyb_isON.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(dround.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(i10powx.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(s_frexp.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(s_modf.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(s_round.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(beep.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(clreol.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(get_minifont.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(getx.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(gety.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(home.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(isatty.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(screen_width.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sprintf.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(ctype.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(kos_fclose.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(Beep.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(_i10pow64.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(assemble_double.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sat_map_s2a.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_is_slowOn.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_slowOff.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(sys_slowOn.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(kos_GetFuncEntry.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(syscallArg0.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(syscallArg2.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(syscallArg3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libhplib.a(syscall.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_udivsi3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_divsi3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_modsi3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_dvmd_tls.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_addsubdf3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_muldivdf3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_cmpdf2.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_fixdfsi.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_addsubsf3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_muldivsf3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_cmpsf2.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_fixunssfsi.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_muldi3.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_fixdfdi.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_fixunsdfdi.o) supports interworking, whereas clock_tuner.elf does not
arm-elf-ld: Warning: /home/a/projects/hpgcc_20/lib/libgcc.a(_fixunsdfsi.o) supports interworking, whereas clock_tuner.elf does not
elf2hp clock_tuner.elf clock_tuner.hp
hp2aplet clock_tuner.hp clock_tuner.apt "Clock Tuner"
Input: clock_tuner.hp Output: clock_tuner.apt
Generating aplet skeleton...
Error: Cannot open file 'HPGCC000.000'.
Makefile:46: recipe for target 'clock_tuner.apt' failed
make: *** [clock_tuner.apt] Error 1
a@kondenzator:~/projects/clock-tuner[2]$ 
Arnie97 commented 4 years ago

Hi Šijanec, Sorry for the late reply.

The core hack of HPGCC happens in ARM Toolbox, aka Lib275, which provides a single ROM pointer xPrRUN that could escape from the emulator, and execute the arbitrary string on the stack as a piece of ARM native code.

If you only have a HP 39 series calculator, it might be difficult to figure out where is the stack, what is an aplet, how to program with System RPL and so on -- since these are deliberately obscured and hidden by HP from the 39 series. So even if you were only interested in programming HP 39, it would be definitely helpful to have a HP 49 (either use a x49gp emulator, or flash a 39gs into a 48gII, or just buy one) along with its user guide, which would allow you to have direct access to the stack, the file hierarchy, UserRPL, SysRPL, etc -- and help you understand all the underlying concepts.

The .hp file is intended for use with the HP 49 series, and the .apt or .000 folder (yes, aplets are SysRPL folders with particular structure) is intended for HP 39. If you use a 49 series, you do not necessarily need elf2hp or hp2aplet, since these are no more than RPL boilerplate generators that help you create a script to put the ARM code as a string on the stack and then execute the xPrRUN hack. However, HP 39 series do not include UserRPL support (read "access to the stack"), so you must compile a wrapper SysRPL program for that, either into an aplet or into a library.

To make things easier for those not familiar with SysRPL and just want to program with C, the HPGCC team shipped their toolchain with hp2aplet and a compiled SysRPL binary -- HPGCC000.000. The original SysRPL source code is here (I've highlighted the core part that push ARM native code to the stack and xPrRun :-). The hp2aplet program reads the SysRPL HPGCC000.000 as the template and patch the placeholder ARM CODE HERE!!! with the actual binary code, so that users do not need a working SysRPL compiler installation to work with HPGCC. However if you developed an interest in SysRPL, the HPGCC boilerplate could be a nice start to understand how to create a aplet with SysRPL. Since the original hp2aplet does not fit all my needs -- it forces me to create a splash screen (well, a 49-ish one -- press Enter to execute and ON to exit) in the aplet -- I've forked it to remove the splash screen and named the fork minstub39.

So back to your questions. If you do not wrap your code in an aplet, you still need to pack it into a library or something else, since there's no way to push it onto the stack of HP 39 series manually. In case that helps, I've attached both my HPGCC000.000 aplet template and the original HPGCC hp2aplet, but do not mix them together, since the offsets in my fork does not match the original; i.e. either use my hp2aplet fork with my HPGCC000.000, or use both hp2aplet and SysRPL binaries from the zip archive. My SysRPL aplet binary was compiled with HP Tools and make hpgccaplet.apt.

Sorry for my late reply again. I've been really busy with my life stuff these days, since the coronavirus outbreak in Wuhan last year delayed my research work for months, and now it's payback time :-) Here is the datasheet of the S3C2410X SOC, which is useful for native ARM programming on the calculator. Glad to hear from you if you have more questions.

sijanec commented 4 years ago

Hello!

Thank you very much for your very detailed reply.

I now understand things much clearer now. Thanks for attaching your assembled HPGCC000.000, I can see the difference. I will try to include the produced ARM code with your hp2aplet.c.k into the placeholder and I am going to try it on an emulator of a 49 series when I will be back from vacation. I will get more familiar with the SysRPL and the 49 series, since I only ever used the HP48G calculator before and only wrote code for it with it's builtin RPN scripting language.

I am glad to hear you are managing the corona-situation over there.

Regards, Anton.

(Sent from a mobile device)

On Sat, 10 Oct 2020, 01:15 Arnie97, notifications@github.com wrote:

Hi Šijanec, Sorry for the late reply.

The core hack of HPGCC happens in ARM Toolbox, aka Lib275, which provides a single ROM pointer xPrRUN that could escape from the emulator, and execute the arbitrary string on the stack as a piece of ARM native code.

If you only have a HP 39 series calculator, it might be difficult to figure out where is the stack, what is an aplet, how to program with System RPL and so on -- since these are deliberately obscured and hidden by HP from the 39 series. So even if you were only interested in programming HP 39, it would be definitely helpful to have a HP 49 (either use a x49gp emulator, or flash a 39gs into a 48gII, or just buy one) along with its user guide, which would allow you to have direct access to the stack, the file hierarchy, UserRPL, SysRPL, etc -- and help you understand all the underlying concepts.

The .hp file is intended for use with the HP 49 series, and the .apt or .000 folder (yes, aplets are SysRPL folders with particular structure) is intended for HP 39. If you use a 49 series, you do not necessarily need elf2hp or hp2aplet, since these are no more than RPL boilerplate generators that help you create a script to put the ARM code as a string on the stack and then execute the xPrRUN hack. However, HP 39 series do not include UserRPL support (read "access to the stack"), so you must compile a wrapper SysRPL program for that, either into an aplet or into a library.

To make things easier for those not familiar with SysRPL and just want to program with C, the HPGCC team shipped their toolchain with hp2aplet and a compiled SysRPL binary -- HPGCC000.000. The original SysRPL source code is here https://github.com/Arnie97/minstub39/blob/a0f46c97f77a168ee352a0c8d84fe4255364dd4e/hpgccaplet.s#L200-L210 (I've highlighted the core part that push ARM native code to the stack and xPrRun :-). The hp2aplet program reads the SysRPL HPGCC000.000 as the template and patch the placeholder ARM CODE HERE!!! https://github.com/Arnie97/minstub39/blob/a0f46c97f77a168ee352a0c8d84fe4255364dd4e/hpgccaplet.s#L252 with the actual binary code, so that users do not need a working SysRPL compiler installation to work with HPGCC. However if you developed an interest in SysRPL, the HPGCC boilerplate could be a nice start to understand how to create a aplet with SysRPL. Since the original hp2aplet does not fit all my needs -- it forces me to create a splash screen (well, a 49-ish one -- press Enter to execute and ON to exit) in the aplet -- I've forked it to remove the splash screen and named the fork minstub39.

So back to your questions. If you do not wrap your code in an aplet, you still need to pack it into a library or something else, since there's no way to push it onto the stack of HP 39 series manually. In case that helps, I've attached both my HPGCC000.000 aplet template https://github.com/Arnie97/clock-tuner/files/5356919/Minstub39.Aplet.Boilerplate.zip and the original HPGCC hp2aplet https://github.com/Arnie97/clock-tuner/files/5356922/HPGCC.Original.Aplet.Boilerplate.zip, but do not mix them together, since the offsets in my fork does not match the original; i.e. either use my hp2aplet fork with my HPGCC000.000, or use both hp2aplet and SysRPL binaries from the zip archive. My SysRPL aplet binary was compiled with HP Tools https://www.hpcalc.org/details/3788 and make hpgccaplet.apt https://github.com/Arnie97/minstub39/blob/master/Makefile.

Sorry for my late reply again. I've been really busy with my life stuff these days, since the coronavirus outbreak in Wuhan last year delayed my research work for months, and now it's payback time :-) Here is the datasheet of the S3C2410X SOC https://github.com/Arnie97/clock-tuner/files/5357959/S3C2410X.pdf, which is useful for native ARM programming on the calculator. Glad to hear from you if you have more questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Arnie97/clock-tuner/issues/2#issuecomment-706439841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFM2ETUYFTLF2QCADRX6ZTSJ6KRXANCNFSM4RYOU6YA .