6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 3:51 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sun Dec 20, 2020 7:34 pm 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
BigEd wrote:
You're welcome. Just one thing... I didn't give a link! Do please share what you found...


Oh I found it in the biggest book there is: https://en.wikipedia.org/wiki/Transport ... chitecture


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 20, 2020 7:39 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
oh!


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2020 3:40 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Re-arranging it a bit (I'm not sure if it'll help, but I do this sometimes to understand it better myself):
Code:
     LDY  #0
     BEGIN
        LDX  $program,Y
        INY
        LDA  $program,Y
        IF_ZERO
           CPX  #0                 ; If second byte is zero:  (This was label zero2.)
           IF_EQ
              LDA  0               ; Both bytes were zero.   (This was label zero3.)
              IF_NOT_ZERO
                 INY
                 LDA  $program,Y   ; Y is PC so modify that.
                 TAY               ; For simplicity, I limited it to 256 bytes of code.
              END_IF
           ELSE_
              LDA  (0,X)
              INY
              ADC  $program,Y
              INY
              SBC  $program,Y
              CMP  (0,X)
              IF_EQ
                 LDA  $program,Y   ; Store value if both ADD and SUB are zero.
              END_IF
              STA  (0,X)
              INY
           END_IF
        ELSE_
           CPX  #0
           IF_EQ
              TAX                  ; If first byte is zero:  (This was label zero1.)
              INY
              LDA  $program,Y
              STA  (0,X)           ; Save LSB into register.
              INY
              INX
              LDA  $program,Y
              STA  (0,X)           ; Save MSB into register.
              INY
           ELSE_
              STA   0              ; Save second register.
              LDA  (0,X)           ; Move data from address in first register.
              LDX   0
              STA  (0,X)           ; Move data to address in second register.
              INY
           END_IF
        END_IF
     AGAIN


program:  data $01, $02, $03, $04, and so on....

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 21, 2020 10:51 am 
Offline

Joined: Sun Apr 26, 2020 3:08 am
Posts: 357
Ugh! NAI (Not Another Interpreter)

But for discussions sake, I'll bite.
The similarities look a lot like what SWEET16 was trying to achieve.

For this to work, it looks like you need a dedicated register. If registers were so easy to do, 8-bit computers would have way more of them.

My biggest question would be, how does the one-opcode know what kind of data it is working on? 8, 16, 24, 32, 64 - bit data? That's a lot of different opcodes, just to figger out the data size let alone what to do with the data.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: