RetroBASIC
Offtopic => Offtopic => Topic started by: Aurel 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)
-
Aurel, could you add a link?
-
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 :-\
-
Unfortunatelly ..most of this c-raps tend to build AST
Ed-s toy not build AST and that is why I like -et ;)
-
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 (http://masm32.com/board/index.php?topic=94.0)
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 (http://masm32.com/board/index.php?topic=5314.0) is a bit over 20,000 lines now ;)
-
over 20,000 lines now
Dude ....
you know with that amount of code I expect totally new assembler/compiler/linker
right?
-
you know with that amount of code I expect totally new assembler/compiler/linker
The totally new assembler is here (http://www.terraspace.co.uk/uasm.html#p2). RichMasm is an editor (http://masm32.com/board/index.php?topic=5314.0), 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 ;)
-
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 ?
-
why your richmasm is not standalone ?
RichMasm is a standalone editor :)