I decided to use sdcc to compile c code to asm to compile to the z80 to run on the ti 84+
C code:
Code:
Then I compiled this through SDCC using the commands:
Code:
then I opened hello.asm in notepad++ and ran the brass assembler from there (dcs_sdk)
Here's the output:
Code:
Anybody know why it won't work?
Oh, and the asm code generated by sdcc:
Code:
C code:
Code:
#include <stdio.h>
main()
{
printf("Hello, World!");
return 0;
}
Then I compiled this through SDCC using the commands:
Code:
sdcc.exe -mz80 hello.c
then I opened hello.asm in notepad++ and ran the brass assembler from there (dcs_sdk)
Here's the output:
Code:
C:\Users\Toshiba Admin\Desktop\Ti84PlusAssemblyCompiler.bat
Process started >>>
C:>compile HI
----------------------------------
Doors CS Assembler\Compiler
Version 2.0
Written by Kerm Martian
http:\\www.Cemetech.net
----------------------------------
----- Assembling HI for the TI-83/84 Plus...
Brass Z80 Assembler 1.0.4.11 - Ben Ryves 2005-2006
--------------------------------------------------
Assembling...
Error: Unsupported directive '.optsdcc'. [zztemp.asm:8]
Error: Unsupported directive '.globl'. [zztemp.asm:13]
Error: Unsupported directive '.globl'. [zztemp.asm:14]
Error: Unsupported directive '.area'. [zztemp.asm:21]
Error: Unsupported directive '.area'. [zztemp.asm:25]
Error: Unsupported directive '.area'. [zztemp.asm:29]
Error: Unsupported directive '.area'. [zztemp.asm:30]
Error: Unsupported directive '.area'. [zztemp.asm:31]
Error: Unsupported directive '.area'. [zztemp.asm:32]
Error: Unsupported directive '.area'. [zztemp.asm:36]
Error: Unsupported directive '.area'. [zztemp.asm:37]
Error: Unsupported directive '.area'. [zztemp.asm:41]
Error: Unsupported directive '.ascii'. [zztemp.asm:58]
Error: Unsupported directive '.area'. [zztemp.asm:60]
Error: Unsupported directive '.area'. [zztemp.asm:61]
Pass 1 complete. (388ms).
Pass 1 failed, pass 2 therefore skipped.
Errors: 15, Warnings: 0.
Build failed.
--+=====================+--
--| BinPac8x v1.2 |--
--| by Kerm Martian |--
--| www.Cemetech.net |--
--| admin@cemetech.net |--
--+=====================+--
**Pass 1/1: .8xp Construction**
Error: Input file HI.bin was not found!
Total time: 0.0s
----- HI for the TI-83/84 Plus Assembled and Compiled.
TI-83 Plus version is HI.8xp
Could Not Find C:\Users\Toshiba Admin\Desktop\dcs_sdk\asm\exec\HI.bin
<<< Process finished.
================ READY ================
cd C:\Users\Toshiba Admin
Anybody know why it won't work?
Oh, and the asm code generated by sdcc:
Code:
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.2.0 #8008 (Jul 6 2012) (MINGW32)
; This file was generated Mon Dec 10 16:18:23 2012
;--------------------------------------------------------
.module HI
.optsdcc -mz80
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _main
.globl _printf
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _DATA
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area _HOME
.area _GSINIT
.area _GSFINAL
.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area _HOME
.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area _CODE
;hello.c:2: main()
; ---------------------------------
; Function main
; ---------------------------------
_main_start::
_main:
;hello.c:4: printf("Hello, World!");
ld hl,#__str_0
push hl
call _printf
pop af
;hello.c:5: return 0;
ld hl,#0x0000
ret
_main_end::
__str_0:
.ascii "Hello, World!"
.db 0x00
.area _CODE
.area _CABS (ABS)