Author Topic: compilers101  (Read 2727 times)

Aurel

  • Guest
compilers101
« on: October 15, 2018, 07:05:06 AM »
yahoo group compilers101
last post in 2017....
there is a ed_davis
well qdepartment is not active but this one have more interesting topics
(for me)

B+

  • Guest
Re: compilers101
« Reply #1 on: October 19, 2018, 03:12:11 PM »
Aurel, could you add a link?

Aurel

  • Guest
Re: compilers101
« Reply #2 on: October 19, 2018, 08:14:45 PM »
here is a link i found on reddit
 https://groups.yahoo.com/neo/groups/compilers101/info

posted by our well know member Ed Davis ...i don't know that he is active there too  :D
where he explain something about code editors atto and how to build code editor in less than 1000lines of
C code ... unfortunatelly i doubt that this compile under windows  :-\

Aurel

  • Guest
Re: compilers101
« Reply #3 on: October 19, 2018, 08:28:34 PM »
Unfortunatelly ..most of this c-raps tend to build AST
Ed-s toy not build AST and that is why I like -et  ;)

jj2007

  • Guest
Re: compilers101
« Reply #4 on: October 20, 2018, 01:36:26 AM »
how to build code editor in less than 1000lines

That's exaggerated, 26 lines should be enough:

GuiMenu equ @Files, &New..., &Open..., &Save, &Build, -, E&xit, @Edit, Cut, Copy, Paste, @Options, Settings, @Help, &About
GuiParas equ "Editor demo", x100, y50, w900, h600      ; menu and paras are optional, if omitted, title is filename
include \masm32\MasmBasic\Res\MbGui.asm         ; part of MasmBasic
GuiControl MyEdit, "RichEdit", wCL$(), font -16        ; use Unicode commandline and a big font (use MakeFont for special needs)
GuiControl MyStatus, "statusbar", "Ready, Готовы, 準備, ..."

Event Menu
  Switch_ MenuID
  Case_ 0: SetWin$ hMyEdit=0    ; pass a nullpointer to clear the control
  Case_ 1
        .if wFileOpen$("Unicode text=*.txu|Plain text=*.txt|Rich text=*.as?;*.rtf|All files=*.*", "Select a file", "Добро_пожаловать.txu")
               SetWin$ hMyEdit=wFileRead$(wFileOpen$())        ; do not use wSetWin$
        .endif
  Case_ 2
        .if FileSave$("Plain text=*.txt|Rich text=*.as?;*.rtf|All files=*.*")
                .if MbOfn.nFilterIndex==2
                                FileWrite FileSave$(), stream:hMyEdit   ; rich text
                .else
                                FileWrite FileSave$(), Win$(hMyEdit)    ; normal text
                .endif
        .endif
  Case_ 3
        FileWrite "tmpBuild.asm", Win$(hMyEdit)
        Launch Cat$("build.bat tmpBuild.asm"
  Case_ 4 .. 9
        MsgBox 0, Str$("Menu #%i not yet implemented", MenuID), "Hi", MB_OK
  Endsw_
GuiEnd


It depends a bit on your needs, of course: RichMasm is a bit over 20,000 lines now ;)

Aurel

  • Guest
Re: compilers101
« Reply #5 on: October 20, 2018, 04:45:19 PM »
over 20,000 lines now

Dude ....
you know with that amount of code I expect totally new assembler/compiler/linker
right?

jj2007

  • Guest
Re: compilers101
« Reply #6 on: October 20, 2018, 05:51:29 PM »
you know with that amount of code I expect totally new assembler/compiler/linker

The totally new assembler is here. RichMasm is an editor, and a very special one. If you deal with a 30,000+ lines source, RichMasm offers some great functionality. Inter alia, I use it also to build my BASIC, C and Pascal sources. I would never use one of those toy editors for a complex task ;)

Aurel

  • Guest
Re: compilers101
« Reply #7 on: October 20, 2018, 10:11:51 PM »
wow UASM looking good but is not ASMosphere and i am not asm programmer
but that is not a point of my wow! ... i simply mean why your richmasm is not standalone ?
and ...you know ?

jj2007

  • Guest
Re: compilers101
« Reply #8 on: October 22, 2018, 01:56:36 AM »
why your richmasm is not standalone ?

RichMasm is a standalone editor :)