senior_falcon Posted March 13, 2020 Author Share Posted March 13, 2020 (edited) Making good progress on this. The work on the fonts is pretty much complete. I am working with Majestyx on some refinements for T40XB. So far: As originally written, an inverted font is loaded by default to allow for highlited text. Now you can use 2 distinct fonts in T40 mode. Can load and save fonts from or to disk. These can be placed in the normal G32 location, the T40 location, and the T40 inverted location. (ASC 128 to 223) Printing asc 0 produced garbage before; now asc 0 is converted to asc 32 and it is printed as a space. To come: Word wrap when printing text on the screen. DONE. Possibly a "window" so you can print text in a selected area of the screen or scroll just that area. DONE. Adjustments to CALL LINK("CHAR") to allow custom definitions in the inverted font. DONE. Edited August 12, 2020 by senior_falcon 7 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted March 27, 2020 Author Share Posted March 27, 2020 In the next day or two I will post a short video showing word wrap, windowing, and 2 fonts at once. (Here a window is an area on the screen where you want to print.) CALL LINK("CLS") clears the entire screen CALL LINK("CLW") clears just the window I went to bed last night thinking there was a bug in the program because it didn't work the way I wanted it to. After sleeping on it I realized that the "bug" was actually a nice feature. 6 1 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted March 27, 2020 Share Posted March 27, 2020 Hooray for unintentional features! 2 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted March 28, 2020 Author Share Posted March 28, 2020 (edited) Not much point in doing a video when a picture will tell the story just as well. Here the screen is filled with ASC 127 (the cursor). I opened two windows that are 8x8 characters wide and high, clear the window with CALL LINK("CLW") For the upper one word wrap is enabled and I print in the upper left of the window with CALL LINK("PRINT",1,1,A$). For the lower one word I have loaded a different font instead of the default inverted font. Word wrap is disabled and again I print to the upper left of the window, this time with CALL LINK("PRINTI",1,1,A$). Note that when printing in a window the row and column is relative to the upper left corner of the window. There is still a little work to do on this. With an 8 character high window you can print to rows 1-9. Row 9 scrolls up a line and then prints until done. For some reason word wrap does not work when printing to rows 8 or 9. (edit) Figured it out! 5 A$="These are the TImes that try men's souls." 10 CALL LINK("T40") 12 CALL LINK("FONTI",60) 13 CALL LINK("CHAR",42,"FFFFFFFFFFFFFFFF") 20 CALL LINK("HCHAR",1,1,127,960) 30 CALL LINK("WINDOW",4,4,11,11) 40 CALL LINK("CLW") 50 CALL LINK("PRINT",1,1,A$) 52 CALL LINK("WINDOW",14,4,21,11) 53 CALL LINK("CLW"):: CALL LINK("NOWRAP") 54 CALL LINK("PRINTI",1,1,A$) 60 GOTO 60 Edited March 28, 2020 by senior_falcon 5 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted March 28, 2020 Share Posted March 28, 2020 It appears both windows are cleared with a single call. Would you consider an option to specify the window you want to clear? Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted March 28, 2020 Author Share Posted March 28, 2020 (edited) 7 hours ago, retroclouds said: It appears both windows are cleared with a single call. Would you consider an option to specify the window you want to clear? Sorry, I should have listed the program so you can see how this works. It has been added to post #154. Line 13 is left over and not needed. You can only specify one window at a time, and CLW will only clear that window. Default is to use the full screen as the window - i.e. the boundaries are 1,1,24,40 Edited March 28, 2020 by senior_falcon 3 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted June 28, 2020 Author Share Posted June 28, 2020 (edited) XB G.E.M is finally coming along nicely. Here is the menu screen: Much of the work is done. Everything in the menu loads and runs as it should. T40XB and T80XB are much more polished at this point. One of the additions is CALL INITG which does CALL INIT and also loads Millers Graphics GPL and DSR link. The lack of these has always been an annoyance in XB. XB2.7 has 13 CALLs to change the screen colors. An example is CALL COLR17. This seems silly to me. I will change this to a single general purpose routine: CALL COLR(FG,BK) so you can use any of the available colors, not just the prepackaged ones. One big change I hope to make is to have an option to use the MiniMemory or Editor/Assembler loader for loading assembly programs instead of the glacially slow GPL loader built into XB. This is about 20x faster and anyone developing assembly routines for XB would find that a welcome addition. I also hope to add SAMS support, but that's not such a high priority for me. (edit) XB2.7 has GPEEK, VPEEK, AND VPOKE. i think these should be changed to PEEKG, PEEKV, and POKEV. This would then be the same as MiniMemory BASIC and RXB. Edited June 28, 2020 by senior_falcon 7 1 Quote Link to comment Share on other sites More sharing options...
+RXB Posted June 28, 2020 Share Posted June 28, 2020 12 hours ago, senior_falcon said: XB G.E.M is finally coming along nicely. Here is the menu screen: Much of the work is done. Everything in the menu loads and runs as it should. T40XB and T80XB are much more polished at this point. One of the additions is CALL INITG which does CALL INIT and also loads Millers Graphics GPL and DSR link. The lack of these has always been an annoyance in XB. XB2.7 has 13 CALLs to change the screen colors. An example is CALL COLR17. This seems silly to me. I will change this to a single general purpose routine: CALL COLR(FG,BK) so you can use any of the available colors, not just the prepackaged ones. One big change I hope to make is to have an option to use the MiniMemory or Editor/Assembler loader for loading assembly programs instead of the glacially slow GPL loader built into XB. This is about 20x faster and anyone developing assembly routines for XB would find that a welcome addition. I also hope to add SAMS support, but that's not such a high priority for me. (edit) XB2.7 has GPEEK, VPEEK, AND VPOKE. i think these should be changed to PEEKG, PEEKV, and POKEV. This would then be the same as MiniMemory BASIC and RXB. Hmm Source of my RXB 2015 CALL BLOAD and CALL BSAVE using Program Image File loading/saving is avaliable to you in GPL not hard to add these commands to XB 2.8 or TI Basic? Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted June 28, 2020 Author Share Posted June 28, 2020 2 minutes ago, RXB said: Hmm Source of my RXB 2015 CALL BLOAD and CALL BSAVE using Program Image File loading/saving is avaliable to you in GPL not hard to add these commands to XB 2.8 or TI Basic? What will this do for me? Quote Link to comment Share on other sites More sharing options...
+RXB Posted June 29, 2020 Share Posted June 29, 2020 (edited) On 6/28/2020 at 8:33 AM, senior_falcon said: What will this do for me? Any XB you use could have these commands added and give you a loader or saver for any XB? That is what you were asking for was it not? With 3 commands added you could load or save entire SAMS from any XB, I do not get why you want to do it the hard way? Edited June 29, 2020 by RXB comment added Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted June 29, 2020 Author Share Posted June 29, 2020 From your response, it is obvious that you haven't done very much assembly programming in the XB environment. If you had then you would understand why this is a worthwhile addition. In writing and testing support routines for XB I have had to load via the s...l...o...w XB loader thousands of times and every single time I have gnashed my teeth and wished for a speedy loader like the one in MiniMemory or EA basic. Quote Link to comment Share on other sites More sharing options...
+RXB Posted June 29, 2020 Share Posted June 29, 2020 16 minutes ago, senior_falcon said: From your response, it is obvious that you haven't done very much assembly programming in the XB environment. If you had then you would understand why this is a worthwhile addition. In writing and testing support routines for XB I have had to load via the s...l...o...w XB loader thousands of times and every single time I have gnashed my teeth and wished for a speedy loader like the one in MiniMemory or EA basic. Hmmm the RXB loader is not slow it loads very quickly as you can see in the Video Demos I have posted. And again it is in GPL so can work for MiniMemory or EA Basic too with hardly any changes. This is a solution that could be added to Basic, MiniMemory, or any XB cart. If you can show Assembly loading Program Image is so much faster then GPL doing the same thing I would be very interested to see the speed difference. Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted June 30, 2020 Author Share Posted June 30, 2020 I am assuming that by the RXB loader you are referring to BLOAD. From your manual: (sic) I understand that this loads and saves program images. Fine, but that's not what I want to do. When you are developing a program, how do you get the object code into memory so you can save it as a program image? The only way I know of is to load the object code with CALL LOAD("DSKn.PROGRAM.OBJ") This is 20x faster in MiniMemory and EA BASIC than it is in TI XB. When you make as many mistakes in the code as I do, you have to load the code 10 times or more in a programming session and that long wait quickly gets old. The dismal performance of the XB GPL loader has frustrated me for well over 30 years. As noted in an earlier post, since you cannot see why this change would be useful, it is clear that you have not done enough work with assembly and XB for this to be an annoyance to you. Quote Link to comment Share on other sites More sharing options...
+RXB Posted June 30, 2020 Share Posted June 30, 2020 (edited) 3 hours ago, senior_falcon said: I am assuming that by the RXB loader you are referring to BLOAD. From your manual: (sic) I understand that this loads and saves program images. Fine, but that's not what I want to do. When you are developing a program, how do you get the object code into memory so you can save it as a program image? The only way I know of is to load the object code with CALL LOAD("DSKn.PROGRAM.OBJ") This is 20x faster in MiniMemory and EA BASIC than it is in TI XB. When you make as many mistakes in the code as I do, you have to load the code 10 times or more in a programming session and that long wait quickly gets old. The dismal performance of the XB GPL loader has frustrated me for well over 30 years. As noted in an earlier post, since you cannot see why this change would be useful, it is clear that you have not done enough work with assembly and XB for this to be an annoyance to you. LOL! My first project was Windy XB in Assembly and that was basically RXB routines converted to GPL. You can find a review of Windy XB and my presentation at Chicago Fair and in Micropendium. Now I often say I do not work with Assembly but I am anything but a Novice at it by proof of my WindyXB that was in par with anyone else products at time. The annoyance is you lack of understanding what I am telling you. My routines are in GPL will work with TI Basic, MiniMemory or XB and all are written in GPL (NOT ASSEMBLY). Now it is Program Image so what exactly is your beef with this approach? (That it is not pure Assembly ONLY?) Edited June 30, 2020 by RXB missing text Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted June 30, 2020 Author Share Posted June 30, 2020 (edited) "Now it is Program Image so what exactly is your beef with this approach?" You hit the nail on the head. It is program image. I don't want to load program image. I want to load assembler object code which you would know if you read my posts more carefully. I have included the file XB256.OBJ This takes 94 seconds to load in XB. It takes 5 seconds in EA basic, but of course that does me no good because I need to have it loaded to XB. Imagine making 10 changes to that in a programming session and every time having to wait, and wait, and wait for it to load before you can test it. People have a tendency to erase traumatic memories from their past, and perhaps you have done that in your recollections of programming in assembly. If RXB can load XB256.OBJ as fast as you say then I am VERY interested. But in the words of Foghorn Leghorn: "I say, boy, pay attention when I’m talkin’ to ya, boy." It's loading the object code that I want to speed up, not making and loading a program image after loading it the slow way. Edited June 30, 2020 by senior_falcon 1 Quote Link to comment Share on other sites More sharing options...
+RXB Posted June 30, 2020 Share Posted June 30, 2020 (edited) 3 hours ago, senior_falcon said: "Now it is Program Image so what exactly is your beef with this approach?" You hit the nail on the head. It is program image. I don't want to load program image. I want to load assembler object code which you would know if you read my posts more carefully. I have included the file XB256.OBJ This takes 94 seconds to load in XB. It takes 5 seconds in EA basic, but of course that does me no good because I need to have it loaded to XB. Imagine making 10 changes to that in a programming session and every time having to wait, and wait, and wait for it to load before you can test it. People have a tendency to erase traumatic memories from their past, and perhaps you have done that in your recollections of programming in assembly. If RXB can load XB256.OBJ as fast as you say then I am VERY interested. But in the words of Foghorn Leghorn: "I say, boy, pay attention when I’m talkin’ to ya, boy." It's loading the object code that I want to speed up, not making and loading a program image after loading it the slow way. Ok I get it now. Hmm in order to fix XB CALL LOAD the error tags and object code tags are different from EA or MiniMemory. The major slowdown is finding these and switching the locations in support routines to the XB version address of these tagged routines. Like everything in XB they made it all more complicated in XB on purpose? [0518] *********************************************************** [0519] * CALL LOAD("DSK#.FILENAME") * [0520] * CALL LOAD(ADDRESS) * [0521] *********************************************************** [0522] C040 BF,02,00 LOAD DST >0001,@CHKSUM {INITIALIZE FILE FLAG} C043 01 [0523] * GKXB Change load routine. Delete check for INIT [0524] * add to clear flag bits. [0525] C044 06,C5,DD CALL GKLOAD [0526] C047 D6,42,B7 GC047 CEQ LPARZ,@CHAT SYNTAX ERROR if no "(" [0527] C04A 45,06 BR ERRSY1 [0528] C04C 0F,79 XML PGMCHR Skip over [0529] * MAIN PARESE LOOP * [0530] * Check for file-name or address [0531] C04E 0F,74 LDP1 XML PARSE [0532] C050 B6 BYTE RPARZ * PARSE up to ")" or "," [0533] C051 D6,4C,65 CEQ STRING,@FAC2 Process file name [0534] C054 60,8D BS LDP2 [0535] * Otherwise it is an address [0536] * Convert address to integer, save in @PC [0537] C056 0F,12 XML CFI Convert FAC to integer [0538] C058 D6,54,03 CEQ 3,@FAC10 Check for overflow [0539] C05B 64,FF BS ERRN01 [0540] C05D BD,04,4A DST @FAC,@PC Save in ERAM location pointer [0541] * Check for "," if there then data should folow [0542] * else end of load statement, goto LDP5 [0543] C060 D6,42,B3 LDP4 CEQ COMMAZ,@CHAT [0544] C063 40,85 BR LDP5 [0545] * DATA follows or a STRING if no more data [0546] C065 0F,79 XML PGMCHR Skip "," [0547] C067 0F,74 XML PARSE Get data value or string if [0548] * end of data [0549] C069 B6 BYTE RPARZ * Parse up to ")" or "," [0550] C06A D6,4C,65 CEQ STRING,@FAC2 No more data [0551] C06D 60,8D BS LDP2 [0552] * FAC contains a numeric [0553] C06F 0F,12 XML CFI FAC to INTEGER [0554] C071 D6,54,03 CEQ 3,@FAC10 Check for overflow [0555] C074 64,FF BS ERRN01 [0556] * GKXB Code for CPU write moved to LOADDT. Add code to [0557] * check VDP or GRAM bits and write to VDP. [0558] C076 DA,80,C2 CLOG >08,@GKFLAG Check VDP bit C079 08 [0559] C07A 66,83 BS LDGRAM No, check GRAM bit [0560] C07C BC,B0,04 ST @FAC1,V*PC Yes, write to VDP C07F 4B [0561] C080 91,04 DINC @PC Point to next byte [0562] C082 05,C0,60 B LDP4 Continue with LOAD routine [0563] * GROM ADDRESS >C088 FOR LDP5 [0564] * Check for ")" IF there return ELSE SYNTAX ERROR [0565] C085 D6,42,B6 LDP5 CEQ RPARZ,@CHAT Return [0566] C088 61,DE BS LDRET 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0010 EQUATES ALCS-359 [0567] C08A 05,C5,06 B ERRSY1 SYNTAX ERROR [0568] * LDP2 [0569] * Process file name [0570] C08D 8E,51 LDP2 CZ @FAC7 Check for null string [0571] C08F 61,CF BS LDNE2 [0572] * GKXB Change 'LOAD FILE' to check for INIT [0573] C091 06,C6,26 CALL GKINIT [0574] *************** LOAD DATA INTO ERAM *********************** [0575] * LOAD FRESTA, FREEND from ERAM [0576] C094 BF,16,20 DST FSLOC,@VARB Source C097 02 [0577] C098 BF,00,83 DST FRESTA,@PAD Destination C09B 08 [0578] C09C BF,5C,00 DST 4,@ARG # of bytes to move C09F 04 [0579] C0A0 0F,89 XML MVUP Load [0580] * Initialize PC, OFFSET in case of no "0" tag [0581] C0A2 BD,04,08 DST @FRESTA,@PC [0582] C0A5 BD,06,08 DST @FRESTA,@OFFADD Base address for load module [0583] * Read in one record, evaluate the TAG field [0584] * LDRD - LDTG [0585] C0A8 BF,02,00 LDRD DST 0,@CHKSUM Clear check sum C0AB 00 [0586] C0AC 06,C2,54 CALL READIT Rear in a record [0587] C0AF 35,00,05 LDTG MOVE 5,V*BUFPNT,@TAG Get TAG & field C0B2 10,B0,0E [0588] C0B5 06,C1,F1 CALL LDIPCS Add 5 to BUFPNT, add ASCII [0589] C0B8 05 BYTE 5 * Value of chars. Read to check [0590] * Convert @FIELD to numeric (from ASCII hex value) [0591] * Store result: HIGH BYTE to FIELD, LOW BYTE to FIELD+1 [0592] * Convert HIGH BYTE first: @FIELD & @FIELD+1 [0593] * Store result in field [0594] C0B9 A6,11,30 SUB >30,@FIELD >30 = "0" [0595] C0BC CE,11,09 CGT 9,@FIELD Subtract ASCII difference [0596] * between "9" and "A" [0597] C0BF 40,C4 BR GC0C7 [0598] C0C1 A6,11,07 SUB 7,@FIELD [0599] C0C4 E2,11,04 GC0C7 SLL 4,@FIELD FIELD=FILED*32 [0600] C0C7 A6,12,30 SUB >30,@FIELD+1 [0601] C0CA CE,12,09 CGT 9,@FIELD+1 [0602] C0CD 40,D2 BR GC0D5 [0603] C0CF A6,12,07 SUB 7,@FIELD+1 [0604] C0D2 A0,11,12 GC0D5 ADD @FIELD+1,@FIELD Add to HIGH BYTE [0605] * Now convert LOW BYTE: @FIELD+2 & @FIELD+3 [0606] * Store result in LOW BYTE of FIELD to FIELD+1 [0607] C0D5 A6,13,30 SUB >30,@FIELD+2 [0608] C0D8 CE,13,09 CGT 9,@FIELD+2 [0609] C0DB 40,E0 BR GC0E3 [0610] C0DD A6,13,07 SUB 7,@FIELD+2 [0611] C0E0 BC,12,13 GC0E3 ST @FIELD+2,@FIELD+1 Store in LOW byte of result [0612] C0E3 E2,12,04 SLL 4,@FIELD+1 FIELD+1 = FIELD+1*32 [0613] C0E6 A6,14,30 SUB >30,@FIELD+3 [0614] C0E9 CE,14,09 CGT 9,@FIELD+3 [0615] C0EC 40,F1 BR GC0F4 [0616] C0EE A6,14,07 SUB 7,@FIELD+3 [0617] C0F1 A0,12,14 GC0F4 ADD @FIELD+3,@FIELD+1 Add to low byte [0618] * Branch to evaluation procedure for TAG [0619] C0F4 A6,10,30 SUB >30,@TAG >30 = "0" [0620] C0F7 D2,10,00 CGE 0,@TAG If TAG < "0" ILLEGAL CHAR [0621] C0FA 45,9B BR ERRUC1 [0622] C0FC CE,10,0A CGT >0A,@TAG TAGS "0" to ":" [0623] C0FF 61,19 BS GC11C [0624] C101 8A,10 CASE @TAG [0625] C103 41,45 BR TAG0 "0" RELOCATABLE LENGTH 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0011 EQUATES ALCS-359 [0626] C105 40,AF BR LDTG IGNORE "1" TAG [0627] C107 40,AF BR LDTG IGNORE "2" TAG [0628] C109 45,9B BR ERRUC1 No external REF "3" [0629] C10B 45,9B BR ERRUC1 No external REF "4" [0630] C10D 41,5A BR TAG5 "5" relocatable entry DEF [0631] C10F 41,5D BR TAG6 "6" Absolute entry DEF [0632] C111 41,8F BR TAG7 "7" check sum [0633] C113 40,AF BR LDTG "8" ignore check sum [0634] C115 41,9C BR TAG9 "9" Absolute LOAD address [0635] C117 41,B7 BR LDDNE ":" end of file [0636] C119 A6,10,11 GC11C SUB >11,@TAG Subtract offset so [0637] * that "A" is =0 [0638] C11C D2,10,00 CGE 0,@TAG ";" to "@" illegal char [0639] C11F 45,9B BR ERRUC1 [0640] * Skip over "I" tag - 8 char, program ID that follows [0641] C121 D6,10,08 CEQ 8,@TAG [0642] C124 61,53 BS LDTG2 [0643] * Skip over "M" TAG -10 char, program ID that follows [0644] C126 D6,10,0C CEQ 12,@TAG [0645] C129 41,32 BR LDTG3 [0646] C12B 06,C1,F1 CALL LDIPCS [0647] C12E 0A BYTE 10 [0648] C12F 05,C0,AF B LDTG [0649] C132 CE,10,05 LDTG3 CGT 5,@TAG TAGS "G" are legal [0650] C135 65,9B BS ERRUC1 [0651] C137 8A,10 CASE @TAG [0652] C139 41,99 BR TAGA "A" RELOCATABLE PROGRAM ADDRE [0653] C13B 41,A5 BR TAGB "B" ABSOLUTE VALUE [0654] C13D 41,A2 BR TAGC "C" RELATIVE ADDRESS [0655] C13F 45,9B BR ERRUC1 "D" ERROR [0656] C141 45,9B BR ERRUC1 "E" ERROR - UNDEFINED [0657] C143 40,A8 BR LDRD "F" END OF RECORD [0658] * TAG0 to TAGB [0659] * EVALUATE TAG FIELDS [0660] C145 BD,06,08 TAG0 DST @FRESTA,@OFFADD NEW BASE ADDRESS [0661] C148 BD,04,08 DST @FRESTA,@PC NEW PC [0662] C14B A1,08,11 DADD @FIELD,@FRESTA ADD LENGTH TO FIND END OF [0663] * RELOCATABLE PROGRAM WHICH IS [0664] * START OF NEXT PROGRAM [0665] * Make sure we won't run into routine name table now, so we [0666] * don't have to check every time we load a value into ERAM [0667] * routine table must make sure it doesn't run into [0668] * relocatable assembly language code through. [0669] C14E C9,08,0A DCHE @FREEND,@FRESTA OUT OF MEMORY [0670] C151 65,29 BS ERRMF1 [0671] * SKIP OVER PROGRAM ID - 8 BYTES [0672] C153 06,C1,F1 LDTG2 CALL LDIPCS [0673] C156 08 BYTE 8 * INC BUFPNT, COMPUTE CHECKSUM [0674] C157 05,C0,AF B LDTG [0675] C15A A1,11,06 TAG5 DADD @OFFADD,@FIELD Add starting offset [0676] * TAG6 is an absolute address so do not need to add offset [0677] C15D 35,00,06 TAG6 MOVE 6,V*BUFPNT,@INDEX Get symbol name C160 5E,B0,0E [0678] C163 06,C1,F1 CALL LDIPCS INC BUPNT, COMPUT CHECKSUM [0679] C166 06 BYTE 6 * We read 6 chars [0680] * Add symbol and its address - stopped in field - to the [0681] * routine entry table. It is put at the end of the table [0682] * (the end of the table is towards the low end of memory) [0683] * Since the table is searched from the end first, if there [0684] * are any duplicate labels the last one entered will have [0685] * precedence over the early one(s). [0686] C167 97,0A DDECT @FREEND Set to address field [0687] * Load address (stored in field in CPU RAM) into routine [0688] * Name table which is in expansion RAM 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0012 EQUATES ALCS-359 [0689] C169 BF,16,83 DST FIELD,@VARB Source C16C 11 [0690] C16D BD,00,0A DST @FREEND,@PAD Destination [0691] C170 BF,5C,00 DST 2,@ARG # bytes to move C173 02 [0692] C174 0F,89 XML MVUP CPUR RAM to ERAM [0693] * Load symbol into routine name table [0694] C176 A7,0A,00 DSUB 6,@FREEND Set to symbol field C179 06 [0695] C17A BF,16,83 DST INDEX,@VARB Source C17D 5E [0696] C17E BD,00,0A DST @FREEND,@PAD Destination [0697] C181 BF,5C,00 DST 6,@ARG Move 6 bytes C184 06 [0698] C185 0F,89 XML MVUP CPU RAM to ERAM [0699] * Check to see if we've run into assembly language code [0700] C187 C9,08,0A DCHE @FREEND,@FRESTA Out of memory [0701] C18A 65,29 BS ERRMF1 [0702] C18C 05,C0,AF B LDTG If not then continue [0703] *********************************************************** [0704] * ROUTINE NAME TABLE ENTRY [0705] * [0706] * 0 1 2 3 4 5 6 7 [0707] * ----------------------------------- [0708] * FREEND | S | Y | M | B | O | L | ADDRESS | [0709] * (AFTER ENTRY) ----------------------------------- [0710] * FREEND | | | | | | | | [0711] * (BEFORE ENTRY) ----------------------------------- [0712] * [0713] * FREEND is initialized to >4000 by INIT, address is at [0714] * a higher memory location then symbol [0715] *********************************************************** [0716] C18F 83,11 TAG7 DNEG @FIELD Checksum is 1's compelement [0717] C191 D5,02,11 DCEQ @FIELD,@CHKSUM Check sum error [0718] C194 45,84 BR ERRDE1 [0719] C196 05,C0,AF B LDTG [0720] C199 A1,11,06 TAGA DADD @OFFADD,@FIELD PC = OFFADD ^ FIELD [0721] * TAG 9 is an absolute address so no need to add offset [0722] C19C BD,04,11 TAG9 DST @FIELD,@PC [0723] C19F 05,C0,AF B LDTG [0724] C1A2 A1,11,06 TAGC DADD @OFFADD,@FIELD [0725] * TAG B is an absolute entry so no need to add offset [0726] * Relocatable code is checked to see if it will run into [0727] * is no need to check now. Absolute code can go anywhere. [0728] * [0729] * Load field into expansion RAM using MVUP routine [0730] C1A5 BD,00,04 TAGB DST @PC,@PAD Destination [0731] C1A8 BF,16,83 DST FIELD,@VARB Source C1AB 11 [0732] C1AC BF,5C,00 DST 2,@ARG Move 2 bytes C1AF 02 [0733] C1B0 0F,89 XML MVUP CPU RAM to ERAM [0734] C1B2 95,04 DINCT @PC We loaded 2 bytes [0735] C1B4 05,C0,AF B LDTG [0736] ********* END OF LOAD FOR CURRENT FILE ******************** [0737] * [0738] * FRESTA & FREEND are stored in CPU RAM (>8308) [0739] * While loading a file into expansion RAM. [0740] * So if the values of FRESTA or FREEND are to be changed [0741] * then word locations >8308 and >830A must be changed and [0742] * not expansion RAM. [0743] * [0744] * LDDNE - LDNE2 [0745] * 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0013 EQUATES ALCS-359 [0746] * DONE WITH LOAD [0747] * Put FRESTA, FREEND back into expansion RAM [0748] * If FRESTA is odd then make it even [0749] * so that the next program starts on an even boundry [0750] C1B7 DA,09,01 LDDNE CLOG 1,@FRESTA+1 Low byte odd? [0751] C1BA 61,BE BS GC1C1 [0752] C1BC 91,08 DINC @FRESTA Force to next even boundry [0753] C1BE BF,16,83 GC1C1 DST FRESTA,@VARB Source C1C1 08 [0754] C1C2 BF,00,20 DST FSLOC,@PAD Destination C1C5 02 [0755] C1C6 BF,5C,00 DST 4,@ARG Load 4 bytes C1C9 04 [0756] C1CA 0F,89 XML MVUP CPU RAM to ERAM [0757] C1CC 06,C2,68 CALL CLSIT Close file [0758] * Check for end of load command ")" [0759] C1CF D6,42,B6 LDNE2 CEQ RPARZ,@CHAT Check for ")" [0760] C1D2 61,DE BS LDRET [0761] C1D4 D6,42,B3 CEQ COMMAZ,@CHAT Syntax error [0762] C1D7 45,06 BR ERRSY1 [0763] C1D9 0F,79 XML PGMCHR Skip comma [0764] C1DB 05,C0,4E B LDP1 Continue in main loop [0765] *************** LDRET - LDRET2 **************************** [0766] * [0767] * Return to calling routine [0768] C1DE 0F,79 LDRET XML PGMCHR Skip over [0769] * Entry point for INIT [0770] C1E0 06,6A,78 LDRET2 CALL CHKEND Check for end of statement [0771] C1E3 45,06 BR ERRSY1 If not end then syntax error [0772] C1E5 06,00,12 CALL RETURN Return to caller [0773] ********************** CHKIN ****************************** [0774] * Check for INIT-FLAG = >AA55 [0775] * MOVE ERAM(INITF) to CPU *FAC [0776] C1E8 PAGE EQU $ [0777] * CHKIN DST FAC,@PAD Destination [0778] * DST INITF,@VARB Source [0779] * DST 2,@ARG 2 bytes [0780] * XML MVUP Move it [0781] * RXB PATCH REPLACE XML MVUP WITH GPL MOVE **************** [0782] * DCEQ >AA55,@FAC Syntax error [0783] C1E8 D7,8F,9D CHKIN DCEQ >AA55,@INITF *** RXB REPLACEMENT ROUTINE ** C1EB 06,AA,55 [0784] C1EE 45,09 BR ERRSYN * SYNTAX ERROR [0785] * No files have been opened so if there is a syntax error [0786] * goto ERRSYN! [0787] C1F0 00 RTN * RETURN TO CALLING ROUTINE [0788] *********************** FILE ROUTINES ********************* [0789] *********************************************************** [0790] * INCREMENT BUFFER POINTER by value after call statement [0791] * ADD VALUES READ TO CHECKSUM unless the first character [0792] * is a "7" = >37 , then add only "7" character to checksum [0793] * (other value is the checksum) [0794] * [0795] *************************** LDIPCS ************************ [0796] C1F1 88,15 LDIPCS FETCH @INDEXC Index = # of bytes read [0797] C1F3 D6,B0,0E CEQ >37,V*BUFPNT C1F6 37 [0798] C1F7 42,04 BR GC213 [0799] C1F9 A3,02,00 DADD >0037,@CHKSUM Add value of "7" to checksum C1FC 37 [0800] C1FD A3,0E,00 DADD 5,@BUFPNT 1 for "7", 4 for checksum C200 05 [0801] C201 05,C2,15 B GC224 [0802] C204 BC,4B,B0 GC213 ST V*BUFPNT,@FAC1 Convert to 2 byte value 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0014 EQUATES ALCS-359 C207 0E [0803] C208 86,4A CLR @FAC ----------------------------- [0804] C20A A1,02,4A DADD @FAC,@CHKSUM Add char to checksum [0805] C20D 91,0E DINC @BUFPNT [0806] C20F 92,15 DEC @INDEXC Do it index # of times [0807] C211 8E,15 CZ @INDEXC [0808] C213 42,04 BR GC213 [0809] C215 00 GC224 RTN [0810] ********************** OPENIT ***************************** [0811] C216 BD,0C,50 OPENIT DST @FAC6,@BYTES Store actual spec length [0812] C219 A3,0C,00 DADD PABLEN+80,@BYTES Add in the PAB length and C21C 5A [0813] * buffer length [0814] C21D 0F,77 XML VPUSH Push possible temp string [0815] C21F 0F,71 XML GETSTR and try to allocate space [0816] C221 0F,78 XML VPOP Restore original string data [0817] * [0818] * THE FOLLOWING VARIABLES CONTAIN IMPORTANT INFO [0819] * [0820] * FAC4, FAC5 Start address of original device specific [0821] * FAC6, FAC7 Length of original device specifications [0822] * SREF Location of PAB in VDP memory [0823] * BYTES Length of entire PAB including specificat [0824] C223 34,50,E0 MOVE @FAC6,V*FAC4,V@PABLEN(@SREF) * Device pathname C226 0A,1C,B0 C229 4E [0825] C22A 86,B0,1C CLR V*SREF Clear the entire PAB [0826] C22D 35,00,09 MOVE PABLEN-1,V*SREF,V@1(@SREF) * Clear PAB C230 E0,01,1C C233 B0,1C [0827] C235 BC,E0,09 ST @FAC7,V@NLEN(@SREF) Copy specifications length C238 1C,51 [0828] C23A BE,E0,08 ST >60,V@SCR(@SREF) Screen offset C23D 1C,60 [0829] C23F BE,E0,01 ST 4,V@FLG(@SREF) Dis, fix, seq, input C242 1C,04 [0830] C244 A1,50,1C DADD @SREF,@FAC6 Calculate the address of [0831] C247 A3,50,00 DADD PABLEN,@FAC6 the buffer C24A 0A [0832] C24B BD,E0,02 DST @FAC6,V@BUF(@SREF) Store buffer address in PAB C24E 1C,50 [0833] C250 06,C2,6C CALL DSRCAL [0834] C253 00 RTN [0835] *********************************************************** [0836] C254 BD,0E,E0 READIT DST V@BUF(@SREF),@BUFPNT INIT buffer pointer C257 02,1C [0837] C259 BE,B0,1C ST 2,V*SREF C25C 02 [0838] C25D BC,E0,05 ST V@LEN(@SREF),V@CHRCNT(@SREF) C260 1C,E0,04 C263 1C [0839] C264 06,C2,6C CALL DSRCAL [0840] C267 00 RTN [0841] ************************* CLSIT *************************** [0842] C268 BE,B0,1C CLSIT ST 1,V*SREF Prepare to close C26B 01 [0843] ******************** DSRCAL - DSKERR ********************** [0844] C26C BD,56,1C DSRCAL DST @SREF,@FAC12 Compute start address of spec [0845] C26F A3,56,00 DADD NLEN,@FAC12 Ready to call DSR routine C272 09 [0846] C273 06,00,10 CALL LINK Call DSR thourgh program link [0847] C276 08 BYTE 8 * Type = DSR (8) [0848] C277 62,81 BS DSKERR Couldn't find the DSR [0849] C279 DA,E0,01 CLOG >E0,V@FLG(@SREF) Set condition bit if no error 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0015 EQUATES ALCS-359 C27C 1C,E0 [0850] C27E 42,81 BR DSKERR [0851] C280 00 RTN [0852] C281 BD,04,40 DSKERR DST @FREPTR,@PABPTR Set up dummy PAB [0853] C284 A7,04,00 DSUB 6,@PABPTR Make it standard size C287 06 [0854] C288 BD,E0,04 DST V*SREF,V@4(@PABPTR) Store error code C28B 04,B0,1C [0855] C28E 06,C2,95 CALL CLSNOE Close File [0856] C291 06,6A,84 CALL ERRZZ Issue I/O error [0857] C294 24 BYTE 36 * [0858] ********************** CLSNOE ***************************** [0859] * Try to close the current file [0860] * Ignore any errors from the closing of the file. [0861] * Since the PAB is not in the normal PAB list [0862] * then we have to close the file in the load routine. [0863] * ERRZZ will close the rest of the files. [0864] * [0865] ** CLOSE IT ONLY IF IT HAS BEEN OPENED [0866] C295 D7,02,00 CLSNOE DCEQ 1,@CHKSUM Check file flag C298 01 [0867] C299 62,AA BS GC2B9 [0868] C29B BE,B0,1C ST 1,V*SREF Store close file code C29E 01 [0869] C29F BD,56,1C DST @SREF,@FAC12 Compute start address of spec [0870] C2A2 A3,56,00 DADD NLEN,@FAC12 Ready to CALL DSR C2A5 09 [0871] C2A6 06,00,10 CALL LINK CALL DSR through program link [0872] C2A9 08 BYTE 8 * "8" is type of DSR [0873] C2AA 00 GC2B9 RTN [0874] *********************************************************** [0875] * INIT JDH 9/02/80 [0876] *********************************************************** [0877] * Check if expansion RAM present [0878] * Load support into expansion RAM from GROM [0879] C2AB 8E,80,84 INIT CZ @RAMTOP If no ERAM, SYNTAX ERROR [0880] C2AE 65,09 BS ERRSYN [0881] ** Load Assembly header, support routines ** [0882] * GKXB Correct INIT routine. [0883] C2B0 31,04,EA MOVE >04EA,G@ALCEND,@>2000 * Move from GROM to RAM C2B3 8F,9D,00 C2B6 98,00 [0884] C2B8 05,C5,D7 B ECRTN * RXB custom return routine [0885] *********************************************************** Now XB uses ROM routines MVUP and MVDWN these do the same thing as GPL MOVE command does. Now problem is sometimes these Assembly ROM routines are not any faster then GPL as it takes many more bytes to set up for MVUP or MVDWN assembly as GPL MOVE takes. In some cases like CALL INIT the single GPL CALL MOVE routine is faster then ROM MVUP or MVDWN just due to set up and use takes longer to perform then the GPL CALL MOVE does as there is no set up required to do same thing so less bytes and less cycles to do same thing. RXB does have some speed ups here but never looked at more issues like yours here, need to examine it further. Edited June 30, 2020 by RXB comment added 1 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted July 11, 2020 Author Share Posted July 11, 2020 (edited) I think this video pretty much says it all. No trickery is involved, just the fast loader from MiniMemory. You can see that it is about 20x faster. (edit) I forgot to mention that the new loader can handle compressed object code, also you can REF VSBW instead of having to use equates. . Edited July 11, 2020 by senior_falcon 4 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted July 21, 2020 Author Share Posted July 21, 2020 (Edit) - I mistakenly posted this in the T40/T80 thread. The end is in sight. I'm really liking the fast assembly language loader! I wish I had that 30 years ago. I have hit one small snag with error reporting on some of the subprograms that do disk access. The error codes all have 50 added to them. So, for example, on return to XB instead of getting the message "I/O ERROR 02" I get "I/O ERROR 52' This is not a huge deal, but I would like to get the number correct if possible. I'm guessing that a byte needs to be cleared somewhere, but where? Any ideas??? (Edit) After some work with the debugger I now understand where the error message is picking up the extra digit. I think the fix will be easy. 5 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted July 22, 2020 Author Share Posted July 22, 2020 (edited) Boy, do I feel dumb. When doing CALL LOAD("DSKXXX") the error message is I/O ERROR 00. The first digit is the operation that caused the error which is OPEN and the second digit means "Bad Device Name" In my font loader CALL LOAD("DSKXXX") gives the error messages I/O ERROR 50. The first digit is the operation that caused the error which is LOAD and the second digit means "Bad Device Name" So it turns out the error reporting is doing what it should and the only error is a "layer 8" error. Edited July 22, 2020 by senior_falcon 7 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted July 31, 2020 Author Share Posted July 31, 2020 On 1/2/2020 at 6:17 AM, wolhess said: Another note: The XB+ shows version 110. XB2.7 shows version 210. It would be nice if XB+ shows a new version, for example 220, 230 or 310 Wolfgang The version number is now a floating point number. If GEM were finished today the version number would be: 2.820200731 which is version 2.8 plus the date in ISO 8601 format YYYY-MM-DD I'm hoping the finished version will be in august. 10 Quote Link to comment Share on other sites More sharing options...
majestyx Posted August 1, 2020 Share Posted August 1, 2020 22 hours ago, senior_falcon said: I'm hoping the finished version will be in august. I check this particular forum almost exclusively to see if the new version is available yet, as well as to see if Rich's RXB 2020 is available. I'm anxiously waiting for the release of both, as they are the two development tools I am using on my latest two projects. Thanks for keeping us updated~! 2 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted August 7, 2020 Author Share Posted August 7, 2020 I am finally done with the additional disk routines. The filenames can be a string constant such as "DSK1.FILE" or a string variable such as A$: CALL LFONT(filename) Loads a font CALL SFONT(filename) Saves a font CALL SAVEIV(filename) Saves an XB program in IV254 format CALL RUN(filename) Runs an XB program CALL RUNL1(filename) Used to chain XB programs together. With RUNL1 you can chain together a very large XB program of almost any size and way larger than the normal 24K limit. The video below shows this capability with two very short programs. Notice how the variables A and B$ are carried into the new program and used by it. RUNL1A - the first part of program 5 CALL LOAD(9458,0,0) 10 PRINT "SEGMENT 1 OF THE PROGRAM" 20 A=3.14 :: B$="HELLO WORLD" 30 CALL RUNL1("DSK9.RUNL1B") RUNL1B - the second part of program 40 PRINT "SEGMENT 2 OF THE PROGRAM" 50 PRINT A:B$ (The comments in line #1 are inserted by SAVEIV. This is only needed for programs less than 256 bytes long. 4 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted August 7, 2020 Share Posted August 7, 2020 7 hours ago, senior_falcon said: I am finally done with the additional disk routines. The filenames can be a string constant such as "DSK1.FILE" or a string variable such as A$: CALL LFONT(filename) Loads a font CALL SFONT(filename) Saves a font CALL SAVEIV(filename) Saves an XB program in IV254 format CALL RUN(filename) Runs an XB program CALL RUNL1(filename) Used to chain XB programs together. How is using CALL RUN() different then XB's RUN"device.filename" for extended basic programs? Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted August 7, 2020 Author Share Posted August 7, 2020 (edited) 1 hour ago, jrhodes said: How is using CALL RUN() different then XB's RUN"device.filename" for extended basic programs? Normally RUN is what you would want to use, but CALL RUN can use a string variable. 5 A$="DSK1.PROGRAM2" 10 CALL RUN(A$) (RUN A$ errors out of the program (all 5 of these can use a string variable) Edited August 7, 2020 by senior_falcon 1 Quote Link to comment Share on other sites More sharing options...
senior_falcon Posted August 11, 2020 Author Share Posted August 11, 2020 XB2.7 has CALL HELP which brings up a help menu. I like the idea, but the menu is not very complete and frankly, not all that helpful. I have come up with a more complete menu for XB2.8 G.E.M. Here are two videos showing it. Right now I am just finishing up testing it so it is still an assembly program loaded using CALL LOAD. The first video shows XB and XB2.8 G.E.M. side by side. This shows the HUGE speed improvement provided by the loader I borrowed from MiniMemory. The second shows the features of the help menu. This has most of the information that I cannot remember and usually have to look up. Now I just need to add it to the cartridge which should be straightforward. 9 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.