Decided But definitely a try. Apps would have to be somehow editted in portions since their so large though.
Anakclusmos wrote:
Apps would have to be somehow editted in portions since their so large though.
Uh-oh. people hacking DCS on calc...
Nada, would have to have a de-compiler. And beside, I already have the DCS5 source. If I edit anything, it'll be the images for the stack items (i told Kerm they need to look better)
Like a theme change for ya PC.
Like a theme change for ya PC.
Anakclusmos wrote:
Nada, would have to have a de-compiler. And beside, I already have the DCS5 source. If I edit anything, it'll be the images for the stack items (i told Kerm they need to look better)
Like a theme change for ya PC.
Heh, but how would you find the locations of the theme items as they shift around between different versions? Either way, I look forward to seeing assembling in action. Like a theme change for ya PC.
Well, it wouldn't be too hard...Just tell a program to look for the hex code of each image in the flash.
Anyway, here's an idea as to how I'll extract parameters from each line of code...
1.)Different parameters are separated with spaces, commas, and parenthesis
2.)The first parameter is always copied to a command buffer
3.)If it starts with a letter and has less than 3 chars, add it to the command buffer.
3.)If it starts with a letter or underscore and has more than 2 chars, equate the value of a label, store it to tempword and add a * to the command buffer.
3.)If it starts with a ",',%,$,@,#, or a number equate value, store it to tempword, and add a * to command buffer.
4.)Look up the command buffer in program memory and copy its value to the program memory.
5.)If the command buffer includes a *, copy 1 byte from tempword to the program, if 2 *'s, copy 2 bytes from tempword to the program mem.
Restrictions are that all labels must have at least 3 chars and all sections for table commands (except the first word in the command) must have less than 3 chars.
Any thoughts?
Anyway, here's an idea as to how I'll extract parameters from each line of code...
1.)Different parameters are separated with spaces, commas, and parenthesis
2.)The first parameter is always copied to a command buffer
3.)If it starts with a letter and has less than 3 chars, add it to the command buffer.
3.)If it starts with a letter or underscore and has more than 2 chars, equate the value of a label, store it to tempword and add a * to the command buffer.
3.)If it starts with a ",',%,$,@,#, or a number equate value, store it to tempword, and add a * to command buffer.
4.)Look up the command buffer in program memory and copy its value to the program memory.
5.)If the command buffer includes a *, copy 1 byte from tempword to the program, if 2 *'s, copy 2 bytes from tempword to the program mem.
Restrictions are that all labels must have at least 3 chars and all sections for table commands (except the first word in the command) must have less than 3 chars.
Any thoughts?
again, when it checks for commands and labels it checks for letters, if it comes across a number, %,$,#,or a @ is knows its a numbers.Do you think less than 3 chars is sufficient for a command param?
Oh, and I like the setup for the last one, 0x9D95h though I would edit it to use for custom base numbers like, 2x0010100 (bin) 8x80 (oct) 16x9D95 (hex) or 7x345 (hect or base7)
Oh, and I like the setup for the last one, 0x9D95h though I would edit it to use for custom base numbers like, 2x0010100 (bin) 8x80 (oct) 16x9D95 (hex) or 7x345 (hect or base7)
Anakclusmos wrote:
again, when it checks for commands and labels it checks for letters, if it comes across a number, %,$,#,or a @ is knows its a numbers.Do you think less than 3 chars is sufficient for a command param?
Well, there's hl/bc/de/ix/iy, ixh and ixl and such. I can't think of any registers that are more than 3 chars.
Anakclusmos wrote:
Oh, and I like the setup for the last one, 0x9D95h though I would edit it to use for custom base numbers like, 2x0010100 (bin) 8x80 (oct) 16x9D95 (hex) or 7x345 (hect or base7)
Aww, you won't let people pick arbitrary formats? - Anakclusmos
- Expert (Posts: 681)
- 19 Jun 2010 10:36:21 pm
- Last edited by Anakclusmos on 19 Jun 2010 10:39:17 pm; edited 1 time in total
just thought I'd make good use of my GetBase routine... But ok.
Crap! I forgot about ixh, ixl, iyh, and iyl! I guess I'll either have to have it check for labels over 3 chars, or any label less than 3 chars will have to start with an underscore.
Crap! I forgot about ixh, ixl, iyh, and iyl! I guess I'll either have to have it check for labels over 3 chars, or any label less than 3 chars will have to start with an underscore.
Anakclusmos wrote:
just thought I'd make good use of my GetBase routine... But ok.
That makes sense then, go for it. That will help keep your program's size down, so that's always a good thing.
ixh, ixl, iyh, and iyl are also called hx, lx, hy, and ly, so that all registers are either one or two characters in length.
calcdude84se wrote:
ixh, ixl, iyh, and iyl are also called hx, lx, hy, and ly, so that all registers are either one or two characters in length.
Really? I've never heard them called that before.
Me neither...hence the reason the command paremeters are 3 chars or less, and labels can be less than 3 chars, but will have to start with an underscore.
The coolest thing is that my assembler uses the #def statements and the \ multiple command symbol so you can make functions like:
Code:
This saves a lot of space in some programs.I'm trying to decide right now whether or not I should add the .module since my compiler's case insensitive.
The coolest thing is that my assembler uses the #def statements and the \ multiple command symbol so you can make functions like:
Code:
#def PushGUIStack(xx,yyyy,zzzz) ld a,xx \ ld hl,yyyy
#defcont ld de,zzzz
This saves a lot of space in some programs.I'm trying to decide right now whether or not I should add the .module since my compiler's case insensitive.
By the way, did you test out ProgPad with the new vectors in Doors CS 6.6 beta? Be aware the my versions are different from yours and use a slightly different data format; check out the wiki for details.
Nah, I check it though. SirCmpwn just got me hooked on Blender and I've been drooling for the last few mins.
- Anakclusmos
- Expert (Posts: 681)
- 21 Jun 2010 02:39:44 pm
- Last edited by Anakclusmos on 21 Jun 2010 07:10:23 pm; edited 2 times in total
Kerm, good news! The reformatted my stack items and the routines you added are 100% compatible! However, I'm still facing issues with the saving part. Here's the source, see if you can find the err:
Code:
Code:
#include "dcs6.inc"
PushGUIStacks = $422A
GUIFindThis = $422D
.org $9D93
.db $bb,$6d
xor d
ret
jr Start
.dw 0
.db 6,0
.dw Icon
.dw 0
.dw APStart
.db $31,$7F
APMain:
.db 3
.db 0,1,7
.db 0,1,1
.db 0,1,2
Icon:
.db $7F,$FE,$BF,$D5,$FF,$FF,$80,$01
.db $80,$01,$80,$01,$80,$01,$80,$01
.db $80,$01,$80,$01,$FF,$FF,$00,$00
.db $C0,$61,$FF,$69,$AD,$5B,$AF,$5B
SubIcon:
.db $3F,$F0,$20,$18,$E0,$14,$A0,$1E
.db $A0,$02,$A0,$02,$A0,$02,$A0,$02
.db $AD,$9A,$A9,$A2,$A5,$62,$AD,$5A
.db $A0,$02,$BF,$FE,$80,$08,$FF,$F8
New:
call 4000H
PopGUIStack()
PushGUIStack(15,Code,7)
GUIMouse(0)
Start:
set 7,(iy+20)
CloseGUIStack()
OpenGUIStack()
ld hl,MainWin
call PushGUIStacks
GUIMouse(0)
APStart:
set 7,(iy+20)
push ix
push ix
CloseGUIStack()
OpenGUIStack()
ld hl,MainWin
call PushGUIStacks
pop hl
ld de,-10
add hl,de
ld e,(hl)
inc hl
ld d,(hl)
dec de
dec de
ld a,15
push de
ld hl,Code
call PushGUIStack
pop bc
ld hl,-6
add hl,bc
push hl
pop bc
pop hl
call TxtToCode
GUIMouse(0)
TxtToCode:
push hl
push bc
push bc
pop de
ld a,15
ld hl,Code
call PushGUIStack
call GUIFindThis
ex de,hl
pop bc
pop hl
ldir
ret
Open:
call 4000h
PopGUIStack()
FileOpen()
ld a,h
or l
jr z,OpenErr
call TxtToCode
GUIMouse(0)
OpenErr:
PushGUIStack(15,Code,7)
GUIMouse(0)
Save:
call 4000h
call GetSourceCode
call FileSaveAs
GUIMouse(0)
GetSourceCode:
ld a,9
call GUIFindThis
ld de,10
add hl,de
ex de,hl
ld hl,-7
add hl,bc
push hl
pop bc
ex de,hl
ld de,APMain+1
ret
Help:
call 4000h
ld hl,HlpWin
call PushGUIStacks
GUIMouse(0)
HlpQuit:
call 4000h
PopGUIStacks(5)
GUIMouse(0)
Compile:
Quit:
call 4000h
CloseGUIStack()
ret
MainWin:
.dw 16
.db LargeWin
.db %11100000
.db %10110000
.db %10010000
.db %10010000
.db %11110000
.db "ProgPad",0
MainBtns:
.dw 10
.db WinButtons
.db %00100000
.dw 0
.dw 0
.dw Quit
ToolBar:
.dw 55
.db LargeSprite
.db 0,0,6,8
.db $01,$00,$20,$10,$08,$04,$79,$30,$27,$D7
.db $C9,$E4,$4D,$4F,$AC,$D4,$2B,$34,$45,$40
.db $AF,$D4,$48,$64,$45,$40,$A8,$56,$A8,$C4
.db $45,$40,$A8,$55,$28,$04,$7D,$7F,$AF,$D7
.db $E8,$C4,$01,$00,$20,$10,$08,$04
HNew:
.dw 9
.db HotSpot
.db 0,0,8,8
.dw New
HOpen:
.dw 9
.db HotSpot
.db 8,0,11,8
.dw Open
HSave:
.dw 9
.db HotSpot
.db 19,0,9,8
.dw Save
HComp:
.dw 9
.db HotSpot
.db 28,0,9,8
.dw Compile
HHelp:
.dw 9
.db HotSpot
.db 37,0,9,8
.dw Help
TabTxt:
.dw 11
.db Text
.db 48,0,0
.db "Tab:",0
Table:
.dw 17
.db TextLineIn
.db 62,1,29
.dw 8
.dw 0
.db "Z80TAB",0
Checker:
.dw 8
.db Rect
.db 0,9,93,48,%10101010
EndOfMainStack:
.db FFh,FFh
Code:
.db 1,10,7,91
.dw 0
.db 0
HLPWin:
.dw 24
.db SmallWin
.db 6,6
.db %01110000
.db %10001000
.db %00110000
.db %00000000
.db %00100000
.db "About Progpad",0
HLPBtns:
.dw 10
.db WinButtons
.db %00100000
.dw 0
.dw 0
.dw HLPQuit
HLPTitle:
.dw 19
.db Text
.db 1,1,0
.db "Progpad v1.0",0
HLPDate:
.dw 17
.db Text
.db 1,8,0
.db "June 16,2010",0
HLPName:
.dw 26
.db Text
.db 1,16,0
.db "By: Ghosuwa Wogomon",0
EndOfHelpStack:
.db FFh,FFh
Can you describe the mode of failure with saving, or should I just compile it myself and take a look?
You can get a better idea compiling for yourself, but basically, the screen just turns white and the calc shuts off.Turn it on and a RAM clear.I uses a TI-83+ rom on WabbitEmu. By the way, I added the checkered starting screen that DocDE uses.
Anakclusmos wrote:
You can get a better idea compiling for yourself, but basically, the screen just turns white and the calc shuts off.Turn it on and a RAM clear.I uses a TI-83+ rom on WabbitEmu. By the way, I added the checkered starting screen that DocDE uses.
Ah, and indeed I was able to replicate your problems when I compiled and tested it. I see that the crash happens after I enter a name and hit save, you must not be passing the proper arguments in or something? I'll edit this post if and when I figure it out,. 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
» Go to Registration page
» Goto page Previous 1, 2, 3, 4, 5 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 3 of 5
» 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
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