OutAccept gives invalid token in AXE?

Code:

Cn2_Setup             = $4209
Cn2_Setdown           = $4212
Cn2_GetK                  = $4221
Incoming                  = $86F3
Outgoing                  = $87FA

hOneVar                 = $01E4 ;"1-Var Stats "
hTwoVar                 = $01E6 ;"2-Var Stats "
hMedMed                 = $01F0 ;"Med-Med "
hLR1                    = $01FE ;"LinReg(ax+b) "
hQuad                   = $01F2 ;"QuadReg "
hCubicR                 = $005C ;"CubicReg "
hQuartR                 = $005E ;"QuartReg "
hZTest                  = $0420 ;"Z-Test("
hTTest                  = $0422 ;"T-Test("

.dw $C0DE

.dw 3 ;Size
.db $08 ;Doors only
.db $F2, 0; 1-Var-Stats
.db 0
.db 0 ;No args
.org 0
        call Cn2_Setup

.dw 3
.db $08
.db $F3,0 ;2-var-stats
.db 0
.db 0
.org 0
        call Cn2_Setdown

.dw 6
.db $08
.db $F8, 0 ;Med-Med
.db 0
.db 0
.org 0
        call Cn2_GetK
        ld h,0
        ld l,a

;Is data available?
.dw dataAvailEnd
.db $08
.db $FF,0 ;LinReg(ax+b)
.db 0
.db 0
.org 0
        ld hl,Incoming+6
        bit 7,(hl)
        jr nz,dataAvailEnd
        ld hl,0
dataAvailEnd:

;Accept data
.dw dataAcceptEnd
.db $08
.db $F9,0 ;Quad reg
.db 0
.db 0
.org 0
        ld hl,Incoming+6
        res 7,(hl)
dataAcceptEnd:

;Is send done?
.dw sendDoneEnd
.db $08
.db $2E, 0;CUbic reg
.db 0
.db 0
        ld hl,Outgoing+6
        bit 7,(hl)
        jr z,sendDoneEnd
        ld hl,0
sendDoneEnd:

;Send data
.dw sendDataEnd
.db $08
.db $2F, 0 ;Quart reg
.db 0
.db 0
.org 0
        ld hl,Outgoing+6
        set 7,(hl)
sendDataEnd:

;Incoming constant
.dw 3
.db $08
.db $BB, $3B ;Z-test
.db 0
.db 0
.org 0
        ld hl,Incoming

.dw 3
.db $08
.db $BB, $3C ;T-Test
.db 0
.db 0
.org 0
        ld hl,Outgoing

.dw 0
.dw hOneVar
.db 7,"CNSetup"

.dw hTwoVar
.db 5,"CNEnd"

.dw hMedMed
.db 5,"CNKey"

.dw hLR1
.db 8,"InAvail?"

.dw hQuad
.db 8,"InAccept"

.dw hCubicR
.db 8,"OutDone?"

.dw hQuartR
.db 9,"OutAccept"

.dw hZTest
.db 6,"InData"

.dw hTTest
.db 7,"OutData"


Edit: Shoulve added more info.

OutDone returns >0 if the out flag is 0 else 1.
InAvail returns >0 if the in flag is 1 else 0.
OutAccept sets out flag to 1.
InAccept sets in flag to 0.

Everything accessible through stats button 2nd and 3rd menus.

Edit: Renamed topic and fixed code a bit. (OutAccept still broken)
1) I forgot to ld h,0 \ ld l,a in the key routine.
2) OutAccept still invalid so you have to {OutData+6}+128->{OutData+6}
3) After a tiny bit of testing, it seems to work. (just a send FF program)
4) I found someone who made a python code skeleton to act as a calc and print bytes it receives.
5) Im dum and also sad no one said anything but its wrong to expect that, no one is obligated to reply.

🙂
Can you share (a lot) more context about what this is? A few people with all the relevant knowledge might know (1) an Axiom is a library or module to be used by other Axe programs, (2) that based on the subforum and the calls in the ASM code you provided, this is to allow Axe programs to interact with CALCnet2.2, and (3) that maybe this speaks a custom chat protocol, rather than the one used by CALCnet Chat! (?). But we deserve more information.
This is an Axe Parser library for communicating with the (globaL)Calcnet protocol. Not necessarily for the Chat protocol. I might add functions for the chat protocol specificly in the future but not now. I should probably rename this thread to AxeNet. I will add more routines for ease of the programmer such as a a copy-send command like this:
Code:
[0001020304]->GDB0
Copy-Send(GDB0,5)

And a send id change command like:

Code:
 SetSendID([AAAAAAAAAA])
.
For now I want to know what people think of this, and how to fix the OutAccept.

Commands:
CNSetup initializes calcnet.
CNEnd uninitializes calcnet.
CNKey acts exactly like getKey (except the getKey(NUM) behavior)
InAvail? says if the input buffer has data.
InAccept sets the input buffer to be able to accept new data.
OutDone? checks if output buffer is done sending its data.
OutAccept (which I should rename to DataSend) lets calcnet know the send buffer is valid send data and to send it.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement