As promised, it's time to work (and of course, get help) on the DCS7 axiom!
(If you don't recall, it's part of the Axe GUI library, which will remain in development since DwarfWM is a shell, not quite a GUI library... unless I'm mistaken, anyways. The stance is to continue both the Axe GUI and this project, but under one roof!)
My assembly sucks, so I would really appreciate the help in making this Axiom! That said, let's get started!
FOSS, as usual - the source is for the SPASM assembler, and can be found here: http://code.google.com/p/axe-gui-libraries/source/browse/src/dcs7axiom/DCSAxiom.z80
Code:
I'm basically testing out things at this point, and if successful, moving on to implement the API from there!
Unfortunately, this isn't on the top of my todo list at the moment - piles and piles of HW and projects plague this week, and potentially next week, so I won't be as active. However, I'm am totally open to suggestions, and when I get a snip of time, implement such suggestions/fixes!
(If you don't recall, it's part of the Axe GUI library, which will remain in development since DwarfWM is a shell, not quite a GUI library... unless I'm mistaken, anyways. The stance is to continue both the Axe GUI and this project, but under one roof!)
My assembly sucks, so I would really appreciate the help in making this Axiom! That said, let's get started!
FOSS, as usual - the source is for the SPASM assembler, and can be found here: http://code.google.com/p/axe-gui-libraries/source/browse/src/dcs7axiom/DCSAxiom.z80
Code:
.nolist
#include "ti83plus.inc"
#include "Axe.inc"
#include "dcs7.inc"
.list
#define B_CALL(xxxx) rst 28h \ .dw xxxx
.dw AXM_HEADER
.dw Ax1_End
.db AXM_ALL
.dw tok_DrawL ;DlgBox()
.db AXM_INLINE
.db AXM_1ARG
.org 0
; OLD CODE:
; call OpenGUIStack
; ld hl,SmWinData
; ld de,SmWinDataEnd-SmWinData
; ld a,GUIRSmallWin
; OK, so let's first get stuff ready!
; Text is stored in HL already, no need to move it around!
; Save hl!
push hl
; Now find the length of the string arg!
call sub_Length
; Copy it to the correct place...
ex de,hl
; Save DE as well, since the OpenGUIStack call will destroy that too.
push de
; Open the GUI stack! This is done here to prevent a crash.
; BUG FIX - OpenGUIStack before "push hl" causes problems, since
; it destroys HL when called. Relocating it to a place where arg HL
; manipulation isn't needed fixes this bug (and the major crash).
; Thanks to KermMartian for the tip!
call OpenGUIStack
; ...and bring back the string arg!
pop hl
; ...and bring back the arg length as well!
pop de
; Set window type!
ld a,GUIRSmallWin
; Push the GUI!
call PushGUIStack
; It looks like we need to use a macro to enable data retrieving from
; the labels inside the Axiom. (The REP_NEXT macro from Axe.inc, that
; is!) Thanks to calc84maniac for the nice catch! :D
REP_NEXT
; Now, add the close button to the window.
ld hl,winButtons
ld de,dat_end-winButtons
ld a,GUIRWinButtons
call pushGUIStack
; Now, render the GUI and give control (mouse) to DCS!
ld hl,0
call GUIMouse
ret
exitMyProg:
call ResetAppPage
ret
winButtons:
.db 00100000b ;only displaying a close button
.dw 0 ;null pointer
.dw 0 ;another null pointer
.dw exitMyProg ;we'll jump to exitMyProg when this button is clicked
dat_end:
Ax1_End:
.dw AXM_END
.end
I'm basically testing out things at this point, and if successful, moving on to implement the API from there!
Unfortunately, this isn't on the top of my todo list at the moment - piles and piles of HW and projects plague this week, and potentially next week, so I won't be as active. However, I'm am totally open to suggestions, and when I get a snip of time, implement such suggestions/fixes!