Ruby text editor, for Assembler code?
Posted: Mon Jun 22, 2020 11:04 am
FS4 has a very much improved assem compiler, the text for which appears on the 'S' output of any DSP box. Here's a typical exerpt :
Really excellent for beginners, it practically tells you what every line does! (The 3.0.6 version is err .. more challenging).
However ... as you gain more knowledge you need ever-fewer comments; I sometimes end up with just the "// Assignment to ' .. ' " lines and remove 80% of the rest. But it can take a while, and it's very easy to make an annoying slip and have to start over ..
Any Ruby genius out there know how to automate some of this process? I feel sure there must be a Ruby text method. I'm thinking something where you can specify the lines you want to remove .. e.g. all the "// '+' Operator" lines, all the "// -> Cast operand to bool" lines. So that you customise it as you gain confidence.
Is it possible? Ta for any help - Ruby, and text in particular, not my forte I'm afraid!
H
- Code: Select all
// Comparison
movaps xmm0,rankSwitch;
cmpps xmm0,oldSwitch,6;
// '&' Operator
andps xmm0,_F_1;
// Assignment to 'reset'
movaps reset,xmm0;
// Comparison
movaps xmm0,rankSwitch;
cmpps xmm0,_F_1,1;
// '&' Operator
andps xmm0,_F_1;
// '+' Operator
addps xmm0,stageIn;
// Assignment to 'stage'
movaps stage,xmm0;
// Comparison
movaps xmm0,stage;
cmpps xmm0,_F_3,0;
// -> Cast operand to bool
xorps xmm1,xmm1;
cmpps xmm1,xmm0,4;
// Assignment to 'go'
movaps go,xmm1;
// Comparison
movaps xmm0,stage;
cmpps xmm0,_F_4,0;
// -> Cast operand to bool
xorps xmm1,xmm1;
cmpps xmm1,xmm0,4;
Really excellent for beginners, it practically tells you what every line does! (The 3.0.6 version is err .. more challenging).
However ... as you gain more knowledge you need ever-fewer comments; I sometimes end up with just the "// Assignment to ' .. ' " lines and remove 80% of the rest. But it can take a while, and it's very easy to make an annoying slip and have to start over ..
Any Ruby genius out there know how to automate some of this process? I feel sure there must be a Ruby text method. I'm thinking something where you can specify the lines you want to remove .. e.g. all the "// '+' Operator" lines, all the "// -> Cast operand to bool" lines. So that you customise it as you gain confidence.
Is it possible? Ta for any help - Ruby, and text in particular, not my forte I'm afraid!
H