2017-10-16 15:41:48 +00:00
|
|
|
|
PR#3
|
|
|
|
|
PREFIX /A2OSX.BUILD
|
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
|
|
|
|
.TF /A2OSX.BUILD/TEST
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB /A2OSX.BUILD/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.BUILD/INC/A2OSX.I
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
|
|
|
|
.DA #64 SS
|
|
|
|
|
.DA #0 ZP
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.FLOAT1 .DA FLOAT1
|
|
|
|
|
L.FLOAT2 .DA FLOAT2
|
|
|
|
|
L.FLOAT3 .DA FLOAT3
|
|
|
|
|
L.FLOAT4 .DA FLOAT4
|
|
|
|
|
L.FLOAT5 .DA FLOAT5
|
|
|
|
|
L.MSG .DA MSG
|
2017-10-17 15:40:21 +00:00
|
|
|
|
L.CONST1 .DA CONST1
|
|
|
|
|
L.CONST2 .DA CONST2
|
2017-10-16 15:41:48 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.INIT clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN >PUSHEA.G ENDPTR
|
2017-10-17 15:40:21 +00:00
|
|
|
|
>PUSHW L.CONST2
|
|
|
|
|
>PUSHEA.G MYFLOAT2
|
|
|
|
|
|
|
|
|
|
>SYSCALL StrToF
|
|
|
|
|
|
|
|
|
|
>PUSHEA.G MYFLOAT2
|
|
|
|
|
|
|
|
|
|
>PUSHEA.G ENDPTR
|
|
|
|
|
>PUSHW L.CONST1
|
|
|
|
|
>PUSHEA.G MYFLOAT1
|
|
|
|
|
|
2017-10-16 15:41:48 +00:00
|
|
|
|
>SYSCALL StrToF
|
|
|
|
|
|
2017-10-17 15:40:21 +00:00
|
|
|
|
>PUSHEA.G MYFLOAT1
|
|
|
|
|
|
2017-10-16 15:41:48 +00:00
|
|
|
|
>PUSHW L.FLOAT5
|
|
|
|
|
>PUSHW L.FLOAT4
|
|
|
|
|
>PUSHW L.FLOAT3
|
|
|
|
|
>PUSHW L.FLOAT2
|
|
|
|
|
>PUSHW L.FLOAT1
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG
|
|
|
|
|
|
|
|
|
|
>SYSCALL PrintF.YA
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sec
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.DOEVENT sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.QUIT clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2017-10-17 15:40:21 +00:00
|
|
|
|
MSG >CSTR "TEST: %e, %e, %e, %e, %e\r\n%e, %e\r\n"
|
2017-10-16 15:41:48 +00:00
|
|
|
|
FLOAT1 .HS 9B3EBC1FFD 99,999,999.9
|
|
|
|
|
FLOAT2 .HS 9E6E6B27FD 999,999,999
|
|
|
|
|
FLOAT3 .HS 9E6E6B2800 1,000,000,000
|
|
|
|
|
FLOAT4 .HS 8100000000 1
|
|
|
|
|
FLOAT5 .HS 9080000000 -32768
|
2017-10-17 15:40:21 +00:00
|
|
|
|
CONST1 >CSTR "3.141592653"
|
|
|
|
|
CONST2 >CSTR "-45.567E-17"
|
2017-10-16 15:41:48 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2017-10-17 15:40:21 +00:00
|
|
|
|
MYFLOAT1 .BS 5
|
|
|
|
|
MYFLOAT2 .BS 5
|
2017-10-16 15:41:48 +00:00
|
|
|
|
ENDPTR .BS 2
|
|
|
|
|
DS.END
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE /A2OSX.BUILD/TEST.S
|
|
|
|
|
ASM
|