Jump to content
43oh

Please attach ASM files


Recommended Posts

Hello Everyone,

None just found out that the forum "code" quoting system screws up the indentation in ASM files(probably others too, but it does not matter there). ASM files need a proper indent format to compile.

 

This is a request to attach your asm files instead of using the BB "code" tags. Thanks!

Link to post
Share on other sites

Regular expression to the rescue.

What I do is find/replace using regexp (in CCS or Notepad++)

find: ^....(.*)$

replace: \1

 

EDIT: This is for those who use FF, looks like Chrome and IE doesn't have that issue.

Link to post
Share on other sites

\1 is a backreference, meaning "that what was in between the parentheses in the pattern", the first pair (1) of parens that is.

 

This one basically cuts off the first four characters in a line, and I'm unsure how that helps, but my editor could have formatted things differently when I pasted this code in it.

Link to post
Share on other sites

Basically, when "Code" is used, 4 spaces are inserted at the beginning of the line and tabs are replaced with 3 spaces.

 

Original:

label

rla R12

mov R12, R14

 

Code:

label
rla	R12
mov	R12, R14

 

Select all and paste in editor:

....label

.......rla...R12

.......mov...R12,.R14

Link to post
Share on other sites
Basically, when "Code" is used, 4 spaces are inserted at the beginning of the line and tabs are replaced with 3 spaces.

Aha, that might be it. "Select all" doesn't work for me, so I manually copy and paste the code block, I have no extra leading white spaces that way. Whatever. X copy-paste is a strange thing, especially with FF in the picture :).

Link to post
Share on other sites
×
×
  • Create New...