GDMike Posted November 3, 2020 Share Posted November 3, 2020 Lee helped me figure it out I'm going to use text dsk1.file and push my filename and count later before calling DSRLNK. Quote Link to comment Share on other sites More sharing options...
apersson850 Posted November 3, 2020 Share Posted November 3, 2020 (edited) 11 hours ago, Lee Stewart said: LI R0,VDPPAB+9 LI R1,COUNT * Note that this will load the address of COUNT, not the content, in R1 MOVB @COUNT,R1 * This will work, though, to get the file name length into the PAB in VDP RAM BLWP @VSBW * Then send the most significant byte of the address to the PAB in VDP RAM LI R0,VDPPAB+10 LI R1,FLNM CLR R2 MOVB @COUNT,R2 SWPB R2 count byte to LSB BLWP @VMBW Here's my suggestion how to move the filename, when it has been updated by user input, to VDP RAM. * Here's a piece of code which is equivalent to what the above one should have accomplished (at least that's what I think) LI R0,VDPPAB+9 * Writes only the length and file name LI R1,COUNT * Fetch it starting from COUNT (which should be the tenth byte in the PAB in CPU RAM) MOVB *R1,R2 * Get the value of the count, make it 16-bit and add one, to account for that not only the file name, but also the count itself, should be transferred SRL R2,8 INC R2 BLWP @VMBW Edited November 3, 2020 by apersson850 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted November 3, 2020 Share Posted November 3, 2020 Yes, I think lee just wanted to provide something I could understand with my limited knowledge of AL..lol But I get ya. Ty Quote Link to comment Share on other sites More sharing options...
GDMike Posted November 3, 2020 Share Posted November 3, 2020 I'll get the data into position first, as I need only 128 bytes in the buffer as pointed out instead of 1028. I'll make sure I have a routine that provides that buffer constantly with a call to DSRLNK to process it in-between. And once I get that working, up to the call to DSRLNK, then I'll work on getting the FLNM, (filename),and COUNT (length of filename), pushed into VRAM PAB. I'll probably use a simpler formula but I understand I need to do what @APERSSON850 is suggesting. 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted November 3, 2020 Share Posted November 3, 2020 I'm not much for providing ready code to people trying to learn programming. They just use it, but never understand it. However, the code I did provide above, to move the count and file name into the PAB in VDP RAM, is only six instructions long. Use that. It's about as simple as it gets. You have to define the PAB image in CPU RAM correctly first, of course. Please put that piece up here when you've done it, so we/I can verify that you fully understand that before you proceed. Otherwise your problems will be eternal. 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted November 5, 2020 Share Posted November 5, 2020 On 11/2/2020 at 7:43 PM, GDMike said: I might be making things worse but to make things clearer you could consider laying out your CPU RAM image of the PAB so that it is easy to remember what is what. Use the CPU PAB as a mirror image of the VDP PAB. Use the mirror for all control and copy it into VDP RAM before calling dsrlink This is nice and it does break each piece down to little sections, but I still don't know how I'd use it? You said when I've got it setup then blast it to vdp. I still need an example. So I can actually see what is going on. Btw, it's a 128 byte record length not 80. Doesn't matter, I see the setup. I do like this approach. Could you create an artificial write of 128 bytes of code that's sitting at >1000 VDPRAM for me whenever you have time. Then everything might click. Thank you. Quote Link to comment Share on other sites More sharing options...
apersson850 Posted November 5, 2020 Share Posted November 5, 2020 (edited) Let's see if this clicks, then. Now you are doing something like this. prepare general PAB in CPU RAM; write PAB to VDP RAM; do things; update filename and length in PAB in VDP RAM; do things; update opcode in PAB in VDP RAM; do things; update record number in PAB in VDP RAM; do things; call DSRLNK; Writing to VDP RAM is complex and takes time, compared to changing things in CPU RAM. So the suggestion is to do like this instead. prepare general PAB in CPU RAM; do things; update filename and length in PAB in CPU RAM; do things; update opcode in PAB in CPU RAM; do things; update record number in PAB in CPU RAM; do things; write PAB to VDP RAM; call DSRLNK; With this strategy, you only mess with moving the PAB to VDP RAM once per DSRLNK call, instead of updating small pieces of it ever so often. You still update pieces of it, but in CPU RAM most of that is a simple MOV or MOVB. No need to BLWP the VDP data transfer routines each time. It does mean that some parts you'll copy in spite of them not being changed, but due to the overhead for each small transfer, it's probably faster anyway, and definitely simpler. Edited November 5, 2020 by apersson850 7 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted November 6, 2020 Author Share Posted November 6, 2020 What he said. 3 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 21, 2021 Share Posted January 21, 2021 (edited) I noticed that in ti basic and with no controller card installed, I can create a file anyway - on tipi by the basic code Open #1:"DSK4.FILE", output, fixed 128 Print#1:A$ Close #1 Is that function not available in assembly? I seemed to have been able to create a PAB and the PAB Address Placed the pab in ram And called DSR Subroutine which is Setting the pointer and calling dsrlnk and data 8. I don't get an error message but the file doesn't get created either. So I'm assuming I have to have a controller card. Edited January 21, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 22, 2021 Share Posted January 22, 2021 Does A$ have any text in the string? 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) 2 minutes ago, BeeryMiller said: Does A$ have any text in the string? It does,BUT I didn't need anything in it, as I found out, I could still receive a 0 in return when using A and B instead of strings Edited January 22, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 I submitted a code source and it demonstrated this, now I'd have to go find it, as I'm moved way beyond this now. Or have I... Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) @BeeryMiller I'm going to submit my NEW Assy code, it's much cleaner and has comments. And let you see..I'll do that tomorrow morning.. Once I master this I'll be able to implement it into SNP as I know how to get the data to the DSR. Just need a little help now with the DSR. I would like to use the file type: Display fixed 120 BUT I could make it all work with Display Variable 80 also. It's just less work with the 120 type. VID_20210121_142107172.mp4 Edited January 22, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) Ok, on that last video I found out my filename wasn't correct, I fixed that and I received no more errors. But the file was never created . So it LED me to ask, do I need a controller card to create files on a tipi drive? Edited January 22, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) @BeeryMiller, here are the files. DSRS is your main source file. It expects chars and subrs(source files) to be in another directory when compiling. So make your changes to the DSRS beginning code routine to have them in a directory of your choice. Everything seems to work until you get to the CONT label. It's near the EOF of the source code DSRS . That is where the call to DSR comes in and pretty much everything is happening near that CONT label. CHARS DSR DSRS SUBRS Edited January 22, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 22, 2021 Share Posted January 22, 2021 You should not need a controller card to create a file. Next question is have you conducted any error checking after the open, write, and close? As you are doing this on the TIPI. look at the TIPI.log file and look at the last lines of the log file right after you run your routine. That will tell you if your OPEN, WRITE, and CLOSE code is being executed by the TIPI and/or if there are errors. I use a program like WinSCP to log into the TIPI using my local host name. Your should be something like 192.168.1.xxx or something else similar depending upon your router. That TIPI log can be very informative if something isn't behaving the way you think it should be. Beery 1 Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 22, 2021 Share Posted January 22, 2021 I'm turning in now, so hopefully others may have a chance to look at your code before I would have a chance. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) 9 minutes ago, BeeryMiller said: You should not need a controller card to create a file. Next question is have you conducted any error checking after the open, write, and close? As you are doing this on the TIPI. look at the TIPI.log file and look at the last lines of the log file right after you run your routine. That will tell you if your OPEN, WRITE, and CLOSE code is being executed by the TIPI and/or if there are errors. I use a program like WinSCP to log into the TIPI using my local host name. Your should be something like 192.168.1.xxx or something else similar depending upon your router. That TIPI log can be very informative if something isn't behaving the way you think it should be. Beery I only have internal DSR error checking relating to the DSR program. Edited January 22, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 22, 2021 Share Posted January 22, 2021 10 hours ago, GDMike said: @BeeryMiller, here are the files. DSRS is your main source file. It expects chars and subrs(source files) to be in another directory when compiling. So make your changes to the DSRS beginning code routine to have them in a directory of your choice. Everything seems to work until you get to the CONT label. It's near the EOF of the source code DSRS . That is where the call to DSR comes in and pretty much everything is happening near that CONT label. CHARS 16.38 kB · 3 downloads DSR 7.88 kB · 2 downloads DSRS 11.38 kB · 2 downloads SUBRS 1.63 kB · 2 downloads I'm briefly looking at your code in DSRS shown below. You are moving a READ byte rather than a WRITE byte into your PAB. I have not tested any reassembly, but at first glance, that is where I would start. WRITEF CLR R5 LI R3,>3000 LI R4,>F80 WF MOV *R3+,*R4+ INC R5 CI R5,25 JNE WF MOVB @READ,R1 LI R0,PAB BLWP @VSBW BL @DSR MOVB @CLOSE,R1 BLWP @VSBW BL @DSR B @STP 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 Sorry, just Left that as Left over trial and error stuff...I was supposed to change that and the file type back to DV 120 and byte count, ? yikes. Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) 4 minutes ago, BeeryMiller said: INC R5 CI R5,25 Also should be 60, but it'll all change to however you make it work, nearest to 120 count, I could also make use of dv 80, just have to add more looping. If you want to shoot for a DV 80. Edited January 22, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 22, 2021 Share Posted January 22, 2021 Try reassembling your project using the WRITE instruction instead of the READ instruction along with whatever other code changes if you want to write something to the TIPI and report back. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 8 hours ago, BeeryMiller said: Try reassembling your project using the WRITE instruction instead of the READ instruction along with whatever other code changes if you want to write something to the TIPI and report back. I changed to a write and made sure I set the pab: PAB DATA >0002,BUFADR,>7878,>0000,0009 For a display fixed 128 file type And made sure to do a write and changed my count to 60 in my loop as I move a word at a time to VDP RAM. I did NOT receive an error this time. And got garbage all over the screen. My PAB ADDRESS is still EQU>079E My BUF ADDRESS is still >F80 No file created. Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 Update DSRS file for your review DSR DSRS Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 22, 2021 Share Posted January 22, 2021 (edited) I got it!!! Oh yeah!! I'm going to go try and read it now that I wrote something! SNUR was indeed created! Edited January 22, 2021 by GDMike 1 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.