GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 (edited) Naahhh..were still not getting the "2A" in R1. I got a small "a" as an output.. I'm probably not clear again.lol .but I'm trying to read the two bytes on the screen that are next to each other, at location 64,65 in this case they are 2A... and I want to get that into R1 as R1= >2A00 ...BUT the two bytes on the screen won't always be 2A. Maybe that's why Lee got confused.. I hope my phone allows me to hit submit... having trouble with this site lately....but my PC is nowhere near my TI.. Edited August 15, 2019 by GDMike Quote Link to comment Share on other sites More sharing options...
PeteE Posted August 15, 2019 Share Posted August 15, 2019 (edited) Hi GDMike, Here's how I would move the lower nibbles of two bytes into a single byte: ; assumes two bytes in R1=>XX00 and R2=>YY00 CI R1,>4000 ; is it a letter? JLE LABEL1 AI R1,>0900 ; >41(A) becomes >4A, etc LABEL1 CI R2,>4000 ; is it a letter? JLE LABEL2 AI R2,>0900 ; >41(A) becomes >4A, etc LABEL2 SRL R2,4 ; R2=>0YY0 MOVB @R2LB,@R1LB ; R1=>XXY0 SLA R1,4 ; R1=>XY00 EDIT: Edited to handle letters above >40, I wasn't thinking about hexadecimal Edited August 15, 2019 by PeteE 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 Thx Pete..I'll give it a try..I'm in explorer with R1,>4120 haha... trying to figure out how to move that to >2A00...I hope your tip settles it. I'll stop and re-code it Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 Trying to figure what happened...but no go ..but gimme a moment I'm in explorer Quote Link to comment Share on other sites More sharing options...
slab0meat Posted August 15, 2019 Share Posted August 15, 2019 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 A view VID_20190815_121714348.mp4 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 This one got close VID_20190815_123650163.mp4 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted August 15, 2019 Share Posted August 15, 2019 I'm working this in Classic99 now... I see a problem with my reasoning... for decimal numbers, like "2", the subtract >30 works! =2 (32-2=2) for hex letters like "A", the subtract >30 does not work! =11 (41-30=11) I imagined it would be be 3A, not 41. Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted August 15, 2019 Share Posted August 15, 2019 (edited) maybe subtract >40 for values over >39 is the answer. edit: not (so simple!) Edited August 15, 2019 by HOME AUTOMATION 1 Quote Link to comment Share on other sites More sharing options...
PeteE Posted August 15, 2019 Share Posted August 15, 2019 Hi GDMike, I see you are not using equates for R1LB and R2LB. This should work instead: CI R1,>4000 ; is it a letter? JLE LABEL1 AI R1,>0900 ; >41(A) becomes >4A, etc LABEL1 CI R2,>4000 ; is it a letter? JLE LABEL2 AI R2,>0900 ; >41(A) becomes >4A, etc LABEL2 SLA R1,4 ; R1=>X000 ANDI R2,>0F00 ; R2=>0Y00 SOCB R2,R1 ; R1=>XY00 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 (edited) I was thinking about this overnight. I was just guessing that an actual program would have to be written and that SR(l,r) alone wouldn't probably cut it. Or basically more would have to be compared and moved around..as a simple SRL,4 and AI >30 or so wasn't gonna be enough. That's kinda why I asked for help in the beginning. Thx Edited August 15, 2019 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 The >A shows up, but not the proceeding>2 in order to form the >2A00 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted August 15, 2019 Share Posted August 15, 2019 This is messy, but works! DEF RUN REF VMBW,VSBR,VSBW BUFF TEXT '2A' RUN LI R0,64 LI R1,BUFF LI R2,2 BLWP @VMBW LI R0,64 BLWP @VSBR SWPB R1 CI R1,>40 JLE NEXT AI R1,->37 JMP NEXT2 NEXT AI R1,->30 NEXT2 SLA R1,4 MOV R1,R4 INC R0 CLR R1 BLWP @VSBR SWPB R1 CI R1,>40 JLE NEXT3 AI R1,->37 JMP NEXT4 NEXT3 AI R1,->30 NEXT4 A R4,R1 SWPB R1 AI R0,31 BLWP @VSBW JMP $ END Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 Ahhhh ..that's looking neat..ok..I'll try it after getting kids from school.. Sorry to put you all thru it..but it's holding up the last part of my program..yikes 1 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted August 15, 2019 Share Posted August 15, 2019 Maybe someday... ..I will call on you to return the favor! 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 I can't wait to try it! Clean up on isle 9900 later...I also have some dirty code, but it works..so I do expect that. There is usually another way to make sloppy code cleaner. Lol...I'll add this to ....dang I'm just trying to write here...I got the msg your content could not be delivered...oh I'm hating this site ..@$_# .....oh, I'll add this to my tool collection! Thanks everyone!!! Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 It works! OMHeck.. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 Wish I could send my photo..but the site won't give me an option to attach any longer.... Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 Just tested in my code! Success! 1 1 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted August 15, 2019 Share Posted August 15, 2019 Yes, my routine library consists of a handful of subs, but they love me ...from afar. -Alex 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 15, 2019 Author Share Posted August 15, 2019 I'll try to finish and post a review...then I gotta get back into trying to get that old ramdisk chipped. Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 16, 2019 Author Share Posted August 16, 2019 A little video. If you insert a "Super-cart" This program reads it..that's all.. Ctrl M will mute the beeps, while Ctrl M pressed again will un-mute. Fctn E and X drive the pages fwd and back in 144 byte pages. Ctrl H takes you to the beginning of >6000 page and Ctrl E takes you to the End of the 8K ram area. VID_20190815_221911888.mp4 Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted August 16, 2019 Share Posted August 16, 2019 Well, I don't know what it's doing... ...but it looks like it works as intended! Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 16, 2019 Author Share Posted August 16, 2019 The test is in my name. Saved to the supercart. It's just a test, but the complete program allows for formatting the cart in a variety of ways with the additional ways to read the cart, decimal,hex and ASCII. This all will be used later as I plan on a game that is loaded into >A000 but plays in >6000 - 4 banks. The data is saved in the cart, skill level, history, levels. Too much to describe...but this is a utility, not that program I describe. Notice you cannot write other than formatting data...(unless you hack the card through other means.. basic,etc..) Quote Link to comment Share on other sites More sharing options...
GDMike Posted August 16, 2019 Author Share Posted August 16, 2019 The test is in my name. Saved to the supercart. It's just a test, but the complete program allows for formatting the cart in a variety of ways with the additional ways to read the cart, decimal,hex and ASCII. This all will be used later as I plan on a game that is loaded into >A000 but plays in >6000 - 4 banks. The data is saved in the cart, skill level, history, levels. Too much to describe...but this is a utility, not that program I describe. Notice you cannot write other than formatting data...(unless you hack the card through other means.. basic,etc..) 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.