EasyPTR APPMAN help
EasyPTR APPMAN help
I am trying to add a menu to an "appendix" prior to compiling a program.
Normally, I would add the menu to a copy of the ptrmen_cde file and add the $$asmb command. However, as I always have the EasyPTR extensions loaded I thought I would create an _app type file. Having never done this before I may be totally misunderstanding the manual, as I can't get it to work.
What I've done is created an _app file with just one menu (at the moment). This was created as APPA0 in AppMan4.
Next, how to include in compiled code...Appendix Manager chapter of the manual says REMark $$asmb=filename,0,60 but the APPAn command says REMark $$asmb=filename,0,64 (I've tried both).
Finally, I've added adr=APPA0("menu") to my code to get the address of the menu so I can use that with MDRAW.
I can't get this to work.
Have I misunderstood the EasyPTR manual? Any help would be welcome.
Normally, I would add the menu to a copy of the ptrmen_cde file and add the $$asmb command. However, as I always have the EasyPTR extensions loaded I thought I would create an _app type file. Having never done this before I may be totally misunderstanding the manual, as I can't get it to work.
What I've done is created an _app file with just one menu (at the moment). This was created as APPA0 in AppMan4.
Next, how to include in compiled code...Appendix Manager chapter of the manual says REMark $$asmb=filename,0,60 but the APPAn command says REMark $$asmb=filename,0,64 (I've tried both).
Finally, I've added adr=APPA0("menu") to my code to get the address of the menu so I can use that with MDRAW.
I can't get this to work.
Have I misunderstood the EasyPTR manual? Any help would be welcome.
Re: EasyPTR APPMAN help
Code: Select all
10 REMark %%dos8_qjewels_qjewels0_app,0,60
....
10000 MDRAW #winw%, APPA0("main_l")
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: EasyPTR APPMAN help
Maybe it's an issue with QLiberator…
1400 REMark $$asmb=WIN1_DEV_QLIB_QLIBPTR_app,0,60
…
14591 a=APPA0("menu1")
14595 MDRAW#c%,a
When running the compiled program I get "Indices wrong" on line 14591
1400 REMark $$asmb=WIN1_DEV_QLIB_QLIBPTR_app,0,60
…
14591 a=APPA0("menu1")
14595 MDRAW#c%,a
When running the compiled program I get "Indices wrong" on line 14591
Re: EasyPTR APPMAN help
You can check your _app file with a hex editor (There's a quite nice one named hexedit on Dilwyn's site) or a disassembler - You should be seeing a BP.INIT-compatible extension table (1 word number of procs (1), 1 word pointer to routine ($xxx), 1 byte (5), 6 Bytes "APPA0",.....) at offset 60. If not, something's wrong with your _APP file. If the offset is not (decimal) 60, use the offset you find.
Tobias
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: EasyPTR APPMAN help
A little program would be helpful for all people, who have problems finding the two parameters of $$asmb to check the extension.tofro wrote:You can check your _app file with a hex editor (There's a quite nice one named hexedit on Dilwyn's site) or a disassembler - You should be seeing a BP.INIT-compatible extension table (1 word number of procs (1), 1 word pointer to routine ($xxx), 1 byte (5), 6 Bytes "APPA0",.....) at offset 60. If not, something's wrong with your _APP file. If the offset is not (decimal) 60, use the offset you find.
Last edited by RalfR on Thu Feb 06, 2020 9:50 am, edited 1 time in total.
7000 4E75
Re: EasyPTR APPMAN help
Tobias
Looks like it is at offset 64.
I am going to try a cut-down program to just display the menu screen and nothing else and work from there, using the $$asmb=name,0,64 directive, and see how it goes
Looks like it is at offset 64.
I am going to try a cut-down program to just display the menu screen and nothing else and work from there, using the $$asmb=name,0,64 directive, and see how it goes
Re: EasyPTR APPMAN help
Hmm...still the same.
141 REMark $$asmb=WIN1_DEV_Qlibptr_app,0,64
165 REMark $$i
170 :
1000 chan3=3 : adr=APPA0('qlib1')
1010 OPEN#chan3;'con_'
1020 MDRAW#chan3,adr
1030 REPeat loop
1040 a=MCALL(#chan3)
1050 IF a=0 THEN EXIT loop
1060 END REPeat loop
1070 CLOSE#chan3
Still get an error when running...."Indices wrong" on the call to APPA0
I'll try running in an environment that has no extra toolkits loaded other than the QLiberator ones and see if something is causing a clash.
141 REMark $$asmb=WIN1_DEV_Qlibptr_app,0,64
165 REMark $$i
170 :
1000 chan3=3 : adr=APPA0('qlib1')
1010 OPEN#chan3;'con_'
1020 MDRAW#chan3,adr
1030 REPeat loop
1040 a=MCALL(#chan3)
1050 IF a=0 THEN EXIT loop
1060 END REPeat loop
1070 CLOSE#chan3
Still get an error when running...."Indices wrong" on the call to APPA0
I'll try running in an environment that has no extra toolkits loaded other than the QLiberator ones and see if something is causing a clash.
Re: EasyPTR APPMAN help
Jon,
You should be able to LRESPR the _app file and RUN or EXecute the SBASIC file to test your program. That should give a clearer idea of where the problem lies..
You should be able to LRESPR the _app file and RUN or EXecute the SBASIC file to test your program. That should give a clearer idea of where the problem lies..
Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Re: EasyPTR APPMAN help
Per,
Doing that allows it to show the menu in SBASIC. If I compile with it LRESPR'd and compile without the $$asmb directive, it runs okay as well.
However, linking in with $$asmb=filename,0,64 results in a message of "String is not numeric" (!!) on the line calling APPA0.
Doing that allows it to show the menu in SBASIC. If I compile with it LRESPR'd and compile without the $$asmb directive, it runs okay as well.
However, linking in with $$asmb=filename,0,64 results in a message of "String is not numeric" (!!) on the line calling APPA0.
- NormanDunbar
- Forum Moderator
- Posts: 2459
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: EasyPTR APPMAN help
getting APPMAN to work always gave me nightmares. The following is taken from my EasyPTR Tutorials from 1994 in Quanta and were originally written for EasyPTR 3:
HTH
Cheers,
Norm.
Code: Select all
EXEC appman_obj
Hit FILES, LOAD, EXTENSION(+APPENDIX), OK.
Locate PTRMEN_CDE and DO it.
Hit FILES, MENU, OK.
Locate your _MEN file, and DO it.
Repeat as necessary to add all your menus.
Hit FILES, SAVE, EXTENSION(+APPENDIX), OK
F3 to edit the default name.
Hit OK to save the renamed file.
Add this to your SuperBASIC program which is to be compiled:
REMark $$asmb=flp1_filename,4,82
HTH
Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.