apersson850 Posted January 27, 2021 Share Posted January 27, 2021 (edited) If you have questions about the program in the scan, just let us know. I wrote it just 35 years ago, so I'm sure I remember it good enough to comment on it! Oh, I realized now that I didn't write about that the tick mark [ ' ] is what the daisy wheel printer used for the @ character. So MOV '6(R13),R2 should be read as MOV @6(R13),R2 Edited January 27, 2021 by apersson850 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 27, 2021 Author Share Posted January 27, 2021 (edited) At least that's in english, bwhahaha ? Edited January 27, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 27, 2021 Share Posted January 27, 2021 Yes, the program itself is in English. That's mainly because of the conflicts with the character sets in the old days, between English and Swedish. The note I wrote above about the tick mark for @ would come back if I attempted to print the program on my old impact printer. MOV @6(R13),R2 would then be printed as MOV É(R13),R2. In Pascal, array[index] would be arrayÄindexÅ and so on. Due to that problem, I always wrote all my code in English, so I could use the English character set in the printer. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 28, 2021 Share Posted January 28, 2021 The Swedish is interesting to me. I speak Dutch and with English there is a lot of overlap in the vocabulary. It's so close to comprehensible to me but not quite. 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) maybe ill figure that out soon Edited January 28, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 1 hour ago, TheBF said: The Swedish is interesting to me. I speak Dutch and with English there is a lot of overlap in the vocabulary. It's so close to comprehensible to me but not quite. i didnt mean to be so blunt on your use of the EQU label tags...I was stressing at that time...sorry about that! Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 28, 2021 Share Posted January 28, 2021 40 minutes ago, GDMike said: i didnt mean to be so blunt on your use of the EQU label tags...I was stressing at that time...sorry about that! No worries. I never know what is helpful or not so I just offer them up. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) 14 minutes ago, TheBF said: No worries. I never know what is helpful or not so I just offer them up. i should have kept my mouth shut...always good to get information..i was def not well then... i have no excuse really, just stupid. I can't read his code on that newsletter well either and a little too much for me to follow. Im still having trouble, I thought I was moving my CPU ram,(S32P1=840 bytes of data) to VDP buffer (BUFR, >1000) by doing this: FPAB DATA >0000,>BUFR,>0000,>0348,>000F TEXT 'DSK3.MYFILE' <--- this is not exact as I adjust the filename later... LI R0,S32P1 LI R1,BUFR LI R2,840 BLWP @VMBR and then performing my WRITE LI R0,FPADR LI R1,FPAB MOVB @SAVE,R1 BLWP VSBW I get a file written to DSK3 called MYFILE It is a PROGRAM type file with a size =2 but viewing the hex file, is '0000' '2020' for most of it except the header... so do you see anything that jumps out? FILEM MYFILE Edited January 28, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 28, 2021 Share Posted January 28, 2021 I think the VMBR should VMBW to write to VDP RAM. You might also want to reorg how you do your PAB it makes it easier to know which fields are bytes and which are ints. (I think I got it right, but double check) * vertical organizing this PAB let's you use the BYTE directive as needed * Better clarity on what is what FPAB * for Load/save actions FLG BYTE >00 * FLG is a BYTE FBUF DATA >BUFR, RLEN DATA >0348, * RLEN and chars field used together RNUM DATA >0000 RSTAT BYTE >00 FLEN BYTE 11 * this byte MUST be the length of the text below TEXT 'DSK3.MYFILE' <--- this is not exact as I adjust the filename later... * WRITE the CPU buffer to VDP RAM LI R0,S32P1 LI R1,BUFR LI R2,840 BLWP @VMBW <-- * we are writing to VDP RAM not reading ? * and then performing my LI R0,FPADR LI R1,FPAB MOVB @SAVE,R1 BLWP VSBW Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 I think the VMBR should VMBW to write to VDP RAM. sorry, that is actually a typo, it is vmbr in the program..it's late for me now I guess... Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 28, 2021 Share Posted January 28, 2021 Just now, GDMike said: I think the VMBR should VMBW to write to VDP RAM. sorry, that is actually a typo, it is vmbr in the program..it's late for me now I guess... Me too. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) 5 minutes ago, TheBF said: * WRITE the CPU buffer to VDP RAM LI R0,S32P1 LI R1,BUFR LI R2,840 BLWP @VMBW This is a typo... It's vmbr in my program.. And the word is read from cpuram Edited January 28, 2021 by GDMike Tired... 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 Just now, TheBF said: Me too. L8tr... I'll deal with it tomorrow..ty.. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 Looks like I found something here from magic crayon. SAVE LI RO , >1000 L I R1 , PATRN LI R2 , >600 BLWP @VMBW LI RO , PAB LI R1 , PDATA * hmm... LI R2 , 21 BLWP @VMBW L I R6 PAB+9 MOV R6 , @PNTR BLWP 6,DSRLNK Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 28, 2021 Share Posted January 28, 2021 You could just as well have studied SETPAB in my program. It installs the PAB in VDP memory, then calls DSRLNK. It also saves what's in VDP RAM at the PAB location, and restores that afterwards, but you don't have to do that if you don't need to. Right at the beginning of SETPAB there's some housekeeping, since I used the same SETPAB regardless of whether I was writing or reading the file. 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 28, 2021 Share Posted January 28, 2021 3 hours ago, TheBF said: I think the VMBR should VMBW to write to VDP RAM. You might also want to reorg how you do your PAB it makes it easier to know which fields are bytes and which are ints. (I think I got it right, but double check) * vertical organizing this PAB let's you use the BYTE directive as needed * Better clarity on what is what FPAB BYTE * for Load/save actions ***** There has to be a byte here too, or everything is off by one **** FLG BYTE >00 * FLG is a BYTE FBUF DATA >BUFR, RLEN DATA >0348, * RLEN and chars field used together RNUM DATA >0000 RSTAT BYTE >00 FLEN BYTE 11 * this byte MUST be the length of the text below TEXT 'DSK3.MYFILE' <--- this is not exact as I adjust the filename later... * WRITE the CPU buffer to VDP RAM LI R0,S32P1 LI R1,BUFR LI R2,840 BLWP @VMBW <-- * we are writing to VDP RAM not reading ? *** Yes, should be VMBW **** * and then performing my LI R0,FPADR LI R1,FPAB <--- There's no point storing a value in R1, when it's overwritten in the next instruction MOVB @SAVE,R1 BLWP VSBW No, this isn't correct. Look at the changes I did in the code above. Mike, you wrote earlier that you can't save this to a floppy disk, since the files are too large. But you save 840 bytes in a file. Even if you merge several such blocks, there's a size limit to memory image files. Normally they aren't more than 8 kbytes each. Which is the limit you are thinking about when you say they are too large for a floppy? 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 28, 2021 Share Posted January 28, 2021 6 hours ago, TheBF said: The Swedish is interesting to me. I speak Dutch and with English there is a lot of overlap in the vocabulary. It's so close to comprehensible to me but not quite. If you know Swedish and German, then you can semi-understand Dutch. One of my daughters speaks decent Dutch. She lived in the media city, Hilversum, for a year. 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) 5 hours ago, apersson850 said: No, this isn't correct. Look at the changes I did in the code above. Mike, you wrote earlier that you can't save this to a floppy disk, since the files are too large. But you save 840 bytes in a file. Even if you merge several such blocks, there's a size limit to memory image files. Normally they aren't more than 8 kbytes each. Which is the limit you are thinking about when you say they are too large for a floppy? Rt now I'm just trying to get anything to write to a file, it doesn't have to be 8k, even though I want 8K on the final result, at this point I'm just trying to get a feel of what and how to get even 840 bytes or 10 bytes on a file. I might be getting 840 bytes here, but it's not the 840 that I'm looking for, it's not my cpu data, it's coming from somewhere else and that is what I was trying to figure out. Edited January 28, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 28, 2021 Share Posted January 28, 2021 (edited) I've understood that part of it. But earlier, when we discussed where to put the buffer in VDP RAM, I pointed out that you should avoid the last part of VDP RAM, as it's used by the disk controller. Then you replied that a floppy was too small. That's why I asked "too small for what?", since it's for sure not too small for 840 bytes. What are your long range plans here? In your comments you stated that VMBR was a typo. That would be good, since i should be VSBW. But then you wrote it's VMBR in the code... It shouldn't be! Again, if you need help understanding what's going on in the code I posted a scan of, then feel free to ask. But I got to get a feeling for where you get stuck, or I can't be of any assistance. Edited January 28, 2021 by apersson850 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 I'm trying something else, I'll tell you in a moment and then we can straighten some things out, because so far, when trying to write a 8K file, I haven't achieved that, even with the pab set for >2000 And my buffer >1000 filled with 8192 bytes of my SNP pages. So in a moment I'll show what I've got in code.. Thx so much Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) Ok, I'm able to create an 8K file. But it's definitely not my buffer Give me some time.. let me work to a point where I can demonstrate what I've got. Edited January 28, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted January 28, 2021 Share Posted January 28, 2021 26 minutes ago, GDMike said: Rt now I'm just trying to get anything to write to a file, it doesn't have to be 8k, even though I want 8K on the final result, at this point I'm just trying to get a feel of what and how to get even 840 bytes or 10 bytes on a file. I might be getting 840 bytes here, but it's not the 840 that I'm looking for, it's not my cpu data, it's coming from somewhere else and that is what I was trying to figure out. What you need to understand is that the DSR does not use CPU RAM buffers. It uses only VDP RAM. The buffer address you put in PAB+2 must be in VRAM. Your CPU RAM buffer(s) must be copied to that VRAM buffer before you attempt to write data to a file. If you are trying to SAVE 8 KiB to a file, you must copy that much data from CPU RAM places to your VRAM buffer. The DSR call by DSRLNK does not do that for you. ...lee Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 (edited) 3 minutes ago, Lee Stewart said: you are trying to SAVE 8 KiB to a file, you must copy that much data from CPU RAM places to your VRAM buffer. The DSR call by DSRLNK does not do that for you. Yes, that is understood, I'm just wondering if I'm doing it correctly with a VMBR. I'll display what I've got a bit later. I'm able to write an 8K file, I'll explain the issue I had with that too. Edited January 28, 2021 by GDMike Quote Link to comment Share on other sites More sharing options...
GDMike Posted January 28, 2021 Author Share Posted January 28, 2021 I placed 2000 in R6 of my pab, but it didn't write 8K, I placed 8192 in that address and it did write 8K Does that make sense? Quote Link to comment Share on other sites More sharing options...
HOME AUTOMATION Posted January 28, 2021 Share Posted January 28, 2021 Hmm ...I'm falling behind on this thread... On 1/27/2021 at 7:07 PM, GDMike said: I'm using>1000 for my buffer area Address That sounds so... inalterable! I was hoping you'd be more open minded about this... On 1/27/2021 at 11:02 AM, HOME AUTOMATION said: ...use VDP RAM from 0 to 15119(18, 840 byte pages). Where feasible, I try to come up with ideas that don't lock-off valuable resources, thus leaving development options open(flexible). On 1/27/2021 at 7:10 PM, GDMike said: What does this look like? I think the PAB has a value for these save/load. But what do you mean VMBW/R? As in reading the screen? ...to save?(from cpu to disk)...? 1. Set up PAB. Probably best to place it at the top of VDP RAM.LOAD 2. Save all or parts of VDP RAM to SAMS or TIPI(for restore after SAVE/completes). -now you can use VDP RAM freely for your SAVE/LOAD operation- 3. Blank the screen using VDP registers(unless you want a kool sideshow on the screen while saving/loading). 4. Use VMBW to move TEXT pages, or entire SAMS pages, to your VDP RAM buffer. 5. Use DSRLNK to SAVE from your VDP RAM buffer to DISK(TIPI). 6. Restore VDP RAM from step 2. 7. Unblank the screen. ...to load?(from disk to cpu)...? 1. Set up PAB. Probably best to place it at the top of VDP RAM. 2. Save all or parts of VDP RAM to SAMS or TIPI(for restore after SAVE/LOAD completes). -now you can use VDP RAM freely for your SAVE/LOAD operation- 3. Blank the screen using VDP registers(unless you want a kool sideshow on the screen while saving/loading). 4. Use DSRLNK to LOAD from DISK(TIPI) to your VDP RAM buffer. 5. Use VMBR to move TEXT pages, or entire SAMS page data, from your VDP RAM buffer, back into to CPU RAM. 6. Restore VDP RAM from step 2. 7. Unblank screen. 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.