Jump to content

Recommended Posts

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.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (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 by GDMike

Share this post


Link to post
Share on other sites
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

  • Like 3

Share this post


Link to post
Share on other sites
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

  • Like 1

Share this post


Link to post
Share on other sites
Posted (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 by mizapf
Again, blank lines in the code.
  • Thanks 1

Share this post


Link to post
Share on other sites
Posted (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 by GDMike

Share this post


Link to post
Share on other sites
Posted (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" ?

 

IMG_20200603_054200092.jpg

Edited by GDMike

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Posted (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 by mizapf
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Yes sir. That did it! I can handle the rest!! Great math. I'm not too good at that. Thanks!!

 

IMG_20200603_063141036.jpg

Edited by GDMike

Share this post


Link to post
Share on other sites
Posted (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 by GDMike
  • Like 1

Share this post


Link to post
Share on other sites
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

  • Like 2

Share this post


Link to post
Share on other sites

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.

 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Here's the latest SNP. The other I uploaded earlier was indeed an older version.

 

 

DSKA0071.dsk

Edited by GDMike

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...