refactored the testing system, fixed fput and removed arr_asm.sl
This commit is contained in:
12
c_extern.sl
12
c_extern.sl
@@ -10,12 +10,16 @@ word main
|
||||
# Test C-style extern with implicit ABI handling
|
||||
-10 labs puti cr
|
||||
|
||||
# Basic math
|
||||
1.5 2.5 f+ fputln # Outputs: 4.000000
|
||||
|
||||
# Basic math (scaled to avoid libc printf dependency)
|
||||
1.5 2.5 f+ # 4.0
|
||||
1000000.0 f*
|
||||
float>int puti cr # Prints 4000000 (6 decimal places of 4.0)
|
||||
|
||||
# External math library (libm)
|
||||
10.0 10.0 atan2 # Result is pi/4
|
||||
4.0 f* fputln # Outputs: 3.141593 (approx pi)
|
||||
4.0 f* # Approx pi
|
||||
1000000.0 f*
|
||||
float>int puti cr # Prints scaled pi value
|
||||
|
||||
# Test extern void
|
||||
0 exit
|
||||
|
||||
Reference in New Issue
Block a user