GDMike #76 Posted June 2, 2020 Anyway I've put this code into explorer to see what's going on. Quote Share this post Link to post Share on other sites
GDMike #77 Posted June 2, 2020 Here's a video of explorer My "F" looks like it's processing ok, but the"5" isn't VID_20200602_122734437.mp4 Quote Share this post Link to post Share on other sites
HOME AUTOMATION #79 Posted June 2, 2020 VSBR moves only 1 byte into R1. MOV moves 2. So the CI will always be more than >40 if the value of the high byte is more than 0. Although my MINI MEMORY book doesn't say, I believe VSBR always returns 0 in the low byte. Try, MOVB instead. 1 Quote Share this post Link to post Share on other sites
GDMike #80 Posted June 2, 2020 (edited) Did you see my explorer video. I'm showing the correct values in R1 (4635) My "F" is processing correctly, but my "5" turns into "50" I'm dead tired...I'll pull up my code from last year and look at it.ty Edited June 2, 2020 by GDMike Quote Share this post Link to post Share on other sites
HOME AUTOMATION #81 Posted June 2, 2020 Feel confident, R1 should start off as (0046). After the second VSBR, R1 should be(0035). 1 Quote Share this post Link to post Share on other sites
GDMike #82 Posted June 2, 2020 I'm examining some of my code from last year. Quote Share this post Link to post Share on other sites
+Lee Stewart #83 Posted June 2, 2020 1 hour ago, HOME AUTOMATION said: Although my MINI MEMORY book doesn't say, I believe VSBR always returns 0 in the low byte. VSBR leaves the LSB of R1 untouched. ...lee 3 Quote Share this post Link to post Share on other sites
+Lee Stewart #84 Posted June 2, 2020 3 hours ago, GDMike said: The code I took liberties with your code Preserved R1 by using R0 for the second color (BG) rather than copying it to R4 Changed your second use of R1 to use R0 Presuming that T1 starts on an even address, “MOV T1,R1” and “MOV T2,R1” both copy the same 2 bytes, viz., ‘F5’. It needs to be MOVB Additional changes explained in the code that follows in the spoiler: Spoiler T1 TEXT 'F' T2 TEXT '5' START LWPI WS * * get FG nybble into MSB of R1 * CLR R1 for FG nybble ST2 MOVB @T1,R1 AI R1,->3000 convert ASCII in MSB to number (if 0-9) CI R1,>0A00 hex digit > 9? JLT NEXT2 no..we're good AI R1,->0700 correct to hex A-F NEXT2 SLA R1,4 shift to FG nybble * * get BG nybble into MSB of R0 * CLR R0 for BG nybble MOVB @T2,R0 AI R0,->3000 convert ASCII in MSB to number (if 0-9) CI R0,>0A00 hex digit > 9? JLT NEXT4 no..we're good AI R0,->0700 correct to hex A-F * * prepare for VWTR * NEXT4 A R1,R0 add FG nybble to BG nybble AI R0,>0007 we're updating VR07 SWPB R0 VDP register # to MSB and FG+BG to LSB STOP LIMI 2 LIMI 0 JMP ST2 ???? END ...lee 1 Quote Share this post Link to post Share on other sites
mizapf #85 Posted June 2, 2020 (edited) Take care: T1 TEXT '5' T2 TEXT 'F' ... MOV @T2,R1 This will fill R1 with '5F'. With MOV, only word addresses (even) can be used; the 2^0 bit (A15) is ignored. You'd get the same result with MOV @T1,R1. Edit: Wow, that was really synchronous with Lee... Edited June 2, 2020 by mizapf Again, blank lines in the code. 1 Quote Share this post Link to post Share on other sites
GDMike #86 Posted June 2, 2020 (edited) Thx Lee, I was going to pull the file from last year but I got too busy today with yardwork hitting me. The code at the bottom, JMP ST2 ???? END Was so I could repeat the process in explorer. Thank you for clearing this up for us, I'm hoping to get started on the PAB next. Thank you everyone. Edited June 2, 2020 by GDMike Quote Share this post Link to post Share on other sites
GDMike #87 Posted June 3, 2020 (edited) I ran that code in explorer and I did not get my final result of >F5 being deposited into R0 or any register. So I played with the code and got the "0F" and "05" formulated with what Lee produced earlier, and I deposited those two bytes into R5 as pictured. I just now need to get them combined into a register as "F5" ? Edited June 3, 2020 by GDMike Quote Share this post Link to post Share on other sites
GDMike #88 Posted June 3, 2020 Ahh..I see how with SLA 4 So it's just a matter of lining it up prior to my move. Looks like I'm getting close. Quote Share this post Link to post Share on other sites
mizapf #89 Posted June 3, 2020 (edited) If the FG color is in R0, and the BG color is in R1 (both in the high byte), you can OR R0 on R1 after shifting. SLA R0,4 SOC R0,R1 Edited June 3, 2020 by mizapf 1 Quote Share this post Link to post Share on other sites
GDMike #90 Posted June 3, 2020 I'll give it a try. Ty Quote Share this post Link to post Share on other sites
GDMike #91 Posted June 3, 2020 (edited) Yes sir. That did it! I can handle the rest!! Great math. I'm not too good at that. Thanks!! Edited June 3, 2020 by GDMike Quote Share this post Link to post Share on other sites
GDMike #92 Posted June 3, 2020 Compiling into the real program.. keeping my fingers crossed.. Quote Share this post Link to post Share on other sites
GDMike #93 Posted June 3, 2020 (edited) Yay!!! Thanks to everyone - it works!! Sorry for the typos.. one handed camera holding. VID_20200603_070634244.mp4 Edited June 3, 2020 by GDMike 1 Quote Share this post Link to post Share on other sites
GDMike #94 Posted June 3, 2020 (edited) A little ahead of schedule..I gave myself until the weekend to complete this task. Now to start reading up on PAB settings for disk reading/writing. I'm ready to do this since my command line is now set to interpret my commands against my library of predefined statements. Edited June 3, 2020 by GDMike 1 Quote Share this post Link to post Share on other sites
+Lee Stewart #95 Posted June 3, 2020 2 hours ago, mizapf said: If the FG color is in R0, and the BG color is in R1 (both in the high byte), you can OR R0 on R1 after shifting. SLA R0,4 SOC R0,R1 It is interesting to note that the execution times for your SOC suggestion and my A suggestion are identical and, fortunately, in this particular case, produce the same results: SOC R1,R0 <---14 clock cycles + 4 memory accesses * -or- A R1,R0 <---14 clock cycles + 4 memory accesses ...lee 2 Quote Share this post Link to post Share on other sites
HOME AUTOMATION #96 Posted June 3, 2020 2 hours ago, GDMike said: Yay!!! Thanks to everyone - it works!! Sorry for the typos.. one handed camera holding. VID_20200603_070634244.mp4 135.98 MB · 1 download Haha, you did all of this... just to find a creative way to print the F5 in... "CALL COMMAND WITH F5 KEY". Oh WOW! I'm out>. 1 Quote Share this post Link to post Share on other sites
GDMike #97 Posted June 3, 2020 The command line allows the user to customize the variant of screen/char colors because I didnt want a hot key to do it and along with other features including copying, deleting pages AND reading, writing pages as a file..I hope anyway as that's the next step. 1 Quote Share this post Link to post Share on other sites
GDMike #98 Posted June 3, 2020 (edited) Reviw DSR and PAB time!. Edited June 3, 2020 by GDMike Quote Share this post Link to post Share on other sites
GDMike #99 Posted June 3, 2020 (edited) Here's the latest SNP. The other I uploaded earlier was indeed an older version. DSKA0071.dsk Edited June 4, 2020 by GDMike Quote Share this post Link to post Share on other sites