News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

JJ_Include and saveAsTemplate

Started by LordAdef, February 21, 2018, 08:26:03 AM

Previous topic - Next topic

LordAdef

Hi Jochen,

I was wondering if there could be a "JJ_Include"  :badgrin:  that we could include asc files for incs and asms. This way people like me could use RM's goodies (colours etc) for the external files too.

This is the sort of magic I'm sure is your thing!

I'm really used to my colour schemes and external files look awful..



saveAsTemplate:  Is there a way to save a asc file as template for new ones? As of now, I have preferencial colours saved in the colour picker, bk colour and everything as I like. I am currently saving my main file as template and clearing the content. But having templates would be a cheery on top of a cake. Not too important but nice

jj2007


LordAdef

So,

I create an IncAsc where I do my code. Then I export it in order to build. It makes sense. That´s what you mean, right?

I guess I could simply copy the "Here" thing into my files. But I need it to point it to my project folder, and export it to either .inc  or .asm

One other thing, The export function is leaving out commented lines

jj2007

Quote from: LordAdef on February 21, 2018, 09:25:10 AMI guess I could simply copy the "Here" thing into my files. But I need it to point it to my project folder, and export it to either .inc  or .asm

Right-click on "Here" 8)

QuoteOne other thing, The export function is leaving out commented lines

This is by design ;-)

LordAdef

QuoteThis is by design ;-)

I love this one! :greensml:

jj2007

No, really, it's by design. It allows me to keep the size of the MB package below the 512k limit, and that really impacts on my coding style: I have become much more generous with comments; and if I want a comment to be public, the if 0 ... comments ... endif still works.

Regarding templates:
- Create a file (File/New text file)
- insert links:
   - copy a path to the template file
   - type MyColours
   - select it
   - hit Ctrl K
   - add n/ before, e.g. /n\Masm32\MasmBasic\AscUser\MyColours.asc
- Save As
- hold Shift when clicking OK
- if you see the "make sticky" dialog, click Yes

The sticky makes sure the file never disappears from your recent files list; the \n makes sure you cannot save the template file, i.e. when trying to save it, you will see the Save As dialog.

LordAdef

Hi,

I still didn´t manage to me it work:

in the asc file, I put this:

Quote;ExportInc


;;;In the link above : exp=\masm32\AFprojs\ii.inc ????
;$uc
echo *** QM included         ; DO you need this?


mox eax, 12
mox ebx, 22

;$RL

I must do this for asc files and inc files. Can you do a version for dummies?

jj2007

; click here to export my stuff ;$uc

The here link has this format:

#unique_token=\masm32\myfolder\somefile.inc
  ... code ...
;$rl ------------- end of unique_token ------------------------

Can you post your asc file, so that I can have a look? And what do you mean with "I have to do it for asc files"? You cannot export rtf code this way (why should you?), only plain text...

LordAdef

Quote"I have to do it for asc files"?
I meant to say *.asm files. It was a typo.

This is a template for what I want. It´s an empty file.

jj2007

OK, here is your file, all text unhidden:

;[url=exp=\masm32\AFprojs\ii.inc]ExportInc[/url]

;;;In the link above : exp=\masm32\AFprojs\ii.inc ????
;$uc
echo *** QM included ; DO you need this?


mox eax, 12
mox ebx, 22

;$RL


Three minor problems:
- # missing: #exp=
- token exp is in " link above : exp=...", so it would stop there; remove that line
- no token exp after that - how should RM know where to stop?

If you replace exp with e.g. exp_ii, it will become clearer. The echo is not needed, it's just for testing.
HTH :icon14:

LordAdef


LordAdef

The file has this now:

Quote;ExportInc

;$uc


mox eax, 12
mox ebx, 22

;$RL

ExportInc has this: #exp_ii.inc=\masm32\AFprojs\ii.inc

But not working: "Not found after link" message

jj2007

Quote from: LordAdef on February 23, 2018, 05:45:20 PM
The file has this now:

Quote;ExportInc

;$uc


mox eax, 12
mox ebx, 22

;$RL

ExportInc has this: #exp_ii.inc=\masm32\AFprojs\ii.inc

But not working: "Not found after link" message

End token missing. Try this:

; *** the end: exp_ii.inc *** $RL

The editor needs to know where your export stops, so there must be an identical token at the end. Btw this allows means that you can have multiple exports in a single *.asc file. You can even append them all to your main RAID source, after the end start or EndOfCode. This way you are working with a single source, and can search and edit directly if needed.

LordAdef

It´s working now. The only problem is my code is commented

";----this is a comment----"

and this process doesn´t seem to work with those, except from comment #-------#, which I´m not using. I like the ";----dsss-"  thing. Not possible?

jj2007

Can you post a sample with tokens and comments, please? Maybe I can do something.

My own multi-line comments are nowadays all like this:
if 0  ; How to proceed:
      - make a plan
      - use it
endif