summaryrefslogtreecommitdiff
path: root/TempCalc/obj
diff options
context:
space:
mode:
Diffstat (limited to 'TempCalc/obj')
-rw-r--r--TempCalc/obj/icon.src9
-rw-r--r--TempCalc/obj/main.c.src348
2 files changed, 357 insertions, 0 deletions
diff --git a/TempCalc/obj/icon.src b/TempCalc/obj/icon.src
new file mode 100644
index 0000000..a0a6924
--- /dev/null
+++ b/TempCalc/obj/icon.src
@@ -0,0 +1,9 @@
+ section .icon
+
+ jp ___prgm_init
+ db $02
+
+ public ___description
+___description:
+ db "Temperature Converter", 0
+___prgm_init:
diff --git a/TempCalc/obj/main.c.src b/TempCalc/obj/main.c.src
new file mode 100644
index 0000000..936f4f7
--- /dev/null
+++ b/TempCalc/obj/main.c.src
@@ -0,0 +1,348 @@
+ section .text,"ax",@progbits
+ assume adl = 1
+ section .text,"ax",@progbits
+ public _main
+_main:
+BB0_1:
+ ld iy, -3145600
+ call _os_ClrLCD
+ call _os_HomeUp
+ call _os_DrawStatusBar
+ ld hl, L_.str
+ push hl
+ call _printf_
+ pop hl
+ call _os_GetKey
+ ld e, l
+ ld d, h
+ ld.sis bc, 147
+ or a, a
+ sbc.sis hl, bc
+ jq z, BB0_4
+ or a, a
+ sbc hl, hl
+ ld l, e
+ ld h, d
+ push hl
+ call _output
+ pop hl
+BB0_3:
+ call _os_GetCSC
+ or a, a
+ jq z, BB0_3
+ jq BB0_1
+BB0_4:
+ ld iy, -3145600
+ call _os_ClrLCD
+ call _os_HomeUp
+ call _os_DrawStatusBar
+ or a, a
+ sbc hl, hl
+ ret
+ section .text,"ax",@progbits
+
+ section .text,"ax",@progbits
+ public _output
+_output:
+ call __frameset0
+ ld iy, -3145600
+ call _os_ClrLCD
+ call _os_HomeUp
+ call _os_DrawStatusBar
+ ld de, 143
+ ld hl, (ix + 6)
+ or a, a
+ sbc hl, de
+ push hl
+ pop de
+ ld bc, 4
+ or a, a
+ sbc hl, bc
+ jq c, BB1_2
+ ld hl, L_.str.5
+ push hl
+ call _printf_
+ pop hl
+ ld hl, L_.str.6
+ ld bc, 0
+ ld e, 0
+ jq BB1_8
+BB1_2:
+ ld hl, LJTI1_0
+ add hl, de
+ add hl, de
+ add hl, de
+ ld hl, (hl)
+ jp (hl)
+BB1_3:
+ ld hl, L_.str.1
+ push hl
+ call _printf_
+ pop hl
+ call _getInput
+ push de
+ push hl
+ call _fToC
+ jq BB1_7
+BB1_4:
+ ld hl, L_.str.3
+ push hl
+ call _printf_
+ pop hl
+ call _getInput
+ push de
+ push hl
+ call _fToK
+ jq BB1_7
+BB1_5:
+ ld hl, L_.str.4
+ push hl
+ call _printf_
+ pop hl
+ call _getInput
+ push de
+ push hl
+ call _kToF
+ jq BB1_7
+BB1_6:
+ ld hl, L_.str.2
+ push hl
+ call _printf_
+ pop hl
+ call _getInput
+ push de
+ push hl
+ call _cToF
+BB1_7:
+ push hl
+ pop bc
+ pop hl
+ pop hl
+ ld hl, L_.str.6
+BB1_8:
+ push de
+ push bc
+ push hl
+ call _printf_
+ ld sp, ix
+ pop ix
+ ret
+ section .text,"ax",@progbits
+ section .rodata,"a",@progbits
+lJTI1_0:
+ private LJTI1_0
+LJTI1_0:
+ dl BB1_3
+ dl BB1_6
+ dl BB1_4
+ dl BB1_5
+
+ section .text,"ax",@progbits
+ public _fToC
+_fToC:
+ call __frameset0
+ ld bc, (ix + 6)
+ ld a, (ix + 9)
+ or a, a
+ sbc hl, hl
+ ld e, -62
+ ld iy, 932068
+ ld d, 63
+ call __fadd
+ lea hl, iy + 0
+ ld e, d
+ call __fmul
+ push bc
+ pop hl
+ ld e, a
+ pop ix
+ ret
+ section .text,"ax",@progbits
+
+ section .text,"ax",@progbits
+ public _getInput
+_getInput:
+ ld hl, -29
+ call __frameset
+ ld hl, L_.str.7
+ xor a, a
+ ld (ix + -26), a
+ lea de, ix + -22
+ ld (ix + -29), de
+ push hl
+ call _printf_
+ pop hl
+BB3_1:
+ call _os_GetKey
+ ld a, l
+ sub a, -116
+ cp a, 2
+ jq nc, BB3_2
+ dec l
+ jq BB3_4
+BB3_2:
+ ld a, l
+ cp a, 5
+ jq z, BB3_5
+BB3_4:
+ ld a, l
+ add a, -94
+ ld de, 0
+ ld c, (ix + -26)
+ ld e, c
+ ld hl, (ix + -29)
+ add hl, de
+ ld (hl), a
+ inc c
+ ld (ix + -26), c
+ ld l, a
+ rlc l
+ sbc hl, hl
+ ld l, a
+ push hl
+ ld hl, L_.str.8
+ push hl
+ call _printf_
+ pop hl
+ pop hl
+ jq BB3_1
+BB3_5:
+ ld de, 0
+ ld a, (ix + -26)
+ ld e, a
+ ld bc, (ix + -29)
+ push bc
+ pop hl
+ add hl, de
+ ld (hl), 0
+ pea ix + -25
+ push bc
+ call _strtod
+ ld sp, ix
+ pop ix
+ ret
+ section .text,"ax",@progbits
+
+ section .text,"ax",@progbits
+ public _cToF
+_cToF:
+ call __frameset0
+ ld bc, (ix + 6)
+ ld a, (ix + 9)
+ ld hl, -1677722
+ ld e, 63
+ ld iy, 0
+ ld d, 66
+ call __fmul
+ lea hl, iy + 0
+ ld e, d
+ call __fadd
+ push bc
+ pop hl
+ ld e, a
+ pop ix
+ ret
+ section .text,"ax",@progbits
+
+ section .text,"ax",@progbits
+ public _fToK
+_fToK:
+ call __frameset0
+ ld hl, (ix + 6)
+ ld a, (ix + 9)
+ ld e, a
+ push de
+ push hl
+ call _fToC
+ push hl
+ pop bc
+ ld a, e
+ pop hl
+ pop hl
+ ld hl, -7831552
+ ld e, 67
+ call __fadd
+ push bc
+ pop hl
+ ld e, a
+ pop ix
+ ret
+ section .text,"ax",@progbits
+
+ section .text,"ax",@progbits
+ public _kToF
+_kToF:
+ call __frameset0
+ ld bc, (ix + 6)
+ ld a, (ix + 9)
+ ld hl, -7831552
+ ld e, -61
+ call __fadd
+ ld l, a
+ push hl
+ push bc
+ call _cToF
+ ld sp, ix
+ pop ix
+ ret
+ section .text,"ax",@progbits
+
+ section .rodata,"a",@progbits
+ private L_.str
+L_.str:
+ db "TempCalc",012o,"Select:",012o,"1. Fahrenheit to Celsius",012o,"2. Celsius to Fahrenheit",012o,"3. Fahrenheit to Kelvin",012o,"4. Kelvin to Fahrenheit",012o,"5. Exit",000o
+
+ section .rodata,"a",@progbits
+ private L_.str.1
+L_.str.1:
+ db "Fahrenheit to Celsius",012o,000o
+
+ section .rodata,"a",@progbits
+ private L_.str.2
+L_.str.2:
+ db "Celsius to Fahrenheit ",012o,000o
+
+ section .rodata,"a",@progbits
+ private L_.str.3
+L_.str.3:
+ db "Fahrenheit to Kelvin",012o,000o
+
+ section .rodata,"a",@progbits
+ private L_.str.4
+L_.str.4:
+ db "Kelvin to Fahrenheit ",012o,000o
+
+ section .rodata,"a",@progbits
+ private L_.str.5
+L_.str.5:
+ db "Invalid",000o
+
+ section .rodata,"a",@progbits
+ private L_.str.6
+L_.str.6:
+ db "",012o,"Output: %f",000o
+
+ section .rodata,"a",@progbits
+ private L_.str.7
+L_.str.7:
+ db "Input: ",000o
+
+ section .rodata,"a",@progbits
+ private L_.str.8
+L_.str.8:
+ db "%c",000o
+
+ ident "clang version 12.0.0 (https://github.com/jacobly0/llvm-project 170be88120e3aa88c20eea5615ba76b8f1d6c647)"
+ extern __Unwind_SjLj_Register
+ extern __frameset
+ extern __fadd
+ extern _printf_
+ extern _os_ClrLCD
+ extern _os_DrawStatusBar
+ extern _os_GetKey
+ extern __fmul
+ extern __Unwind_SjLj_Unregister
+ extern _strtod
+ extern _os_GetCSC
+ extern __frameset0
+ extern _os_HomeUp