Users browsing this thread: 1 Guest(s)
How to Paste Code and Other Posting Best Practices

#1
Posts: 61
Threads: 18
Thanks Received: 3
Thanks Given: 51
Joined: May 2014
Status
None
Your code doesn't look so good on this site?  Open up NotePad++ and go to Edit > Blank Operations > Tab to Space (All).

Now how do we paste table data?  So far I'm just pasting into NotePad++, converting tabs to spaces, then spacing each row.  And it still doesn't work!

[Image: AHhGMpf.png]

Becomes this in NotePad++ after some tweaking:

[Image: mhs8mD1.png]

Which then becomes this:

Code:
B   A                                                                   Binary B   Binary A    Total   $E8 $E9   $EA
2   10  PHP Push flag register (get flags out)         00000010    00001010    522   255          ??
2   10  SEP 8bit mode                                         00000010    00001010    522   255          ??
            STZ Store 0 at $EA location                     00000000    00000000    0      255          0
            STA Store A in $E9                                 00000000    00000000    0      255   2     10
  Find
Quote  

#2
Posts: 3,615
Threads: 264
Thanks Received: 664
Thanks Given: 270
Joined: Oct 2011
Reputation: 60
Status
Faith
Code:
B   A                                                 Binary B   Binary A    Total     $E8   $E9     $EA
2   10  PHP Push flag register (get flags out)        00000010    00001010    522      255            ??
2   10  SEP 8bit mode                                 00000010    00001010    522      255            ??
            STZ Store 0 at $EA location               00000000    00000000    0        255            0
            STA Store A in $E9                        00000000    00000000    0        255    2       10

I noticed when doing space to tab your stuff was not aligned properly (not the same amount of tabs). It took me like 1min to fix with tabs, then I did tab to space.

Put your excel file as attachment, maybe someone can figure it out properly.



  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • ReturnerScum (08-04-2018)

#3
Posts: 61
Threads: 18
Thanks Received: 3
Thanks Given: 51
Joined: May 2014
Status
None
Thanks, I think I got it, purely because of your input.  I had to adjust it in notepad to look how I thought it should, Tab-to-Space, then Space-to-Tab, then adjust it again, then Tab-to-Space again:
  
Code:
Initial Pasting here:
-----------------
OpCode        X    B    A            
C2 20    REP #20            16b    
B9    F4 3B    LDA, Y $3BF4                LDA, Y    HP
4A    LSR    Divide by 2
4A    LSR    4
4A    LSR    8
4A    LSR    16


Tab to space
------------------------
OpCode                                        X            B            A            
C2 20        REP #20                                                        16b    
B9                F4 3B    LDA, Y $3BF4                                        LDA, Y    HP
4A            LSR    Divide by 2
4A            LSR    4
4A            LSR    8
4A            LSR    16

Then Space to Tab
----------------------
OpCode                                        X            B            A            
C2 20        REP #20                                                        16b    
B9                F4 3B    LDA, Y $3BF4                                        LDA, Y    HP
4A            LSR    Divide by 2
4A            LSR    4
4A            LSR    8
4A            LSR    16

On Notepad++, it looks like there's just one row that's uneven,
so fix that row then Tab to Space again.
It looks uneven in Notepad++ but now it works!
-----------------------
OpCode                                      X           B           A           
C2 20       REP #20                                                     16b 
B9          F4 3B   LDA, Y $3BF4                                        LDA, Y  HP
4A          LSR Divide by 2
4A          LSR 4
4A          LSR 8
4A          LSR 16
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite