flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > cicada-nymph Goto page 1, 2 Next |
Author |
|
xyh 15 Mar 2015, 19:14
the little nymph is for teaching purpose only
it reuses the code and idea of the early version of cicada-language to teach my friends how to implement a interpreter of a simple programming language I will use assembly language (FASM for x86-64) to implement the interpreter the programming language to be implemented is a threaded-code based (Forth-like) language two versions of the interpreter is implemented one for linux one for windows to assemble it 1. download FASM from : http://flatassembler.net/ or : https://github.com/the-little-language-designer/fasm 2. choose your platform by editing the first few lines of the source code if you are using linux : linux? equ yes windows? equ no if you are using windows : linux? equ no windows? equ yes 3. assemble the program by the following one way or another the command line interface of fasm : fasm -m 500000 cicada-nymph.fasm the fasm IDE (windows only) : File -> Open -> (choose the file) Options -> Compiler setup -> (set Memory to : 524288) Run -> Compile (output file will be saved in where the source file is) the code of this program can be download from : https://github.com/the-little-language-designer/cicada to track todos, bugs, feature requests, and more you can create an issue here : https://github.com/the-little-language-designer/cicada/issues _________________ the world is so often too complicated for the rules we make to keep it orderly. https://github.com/xieyuheng Last edited by xyh on 23 Apr 2015, 18:27; edited 1 time in total |
|||
15 Mar 2015, 19:14 |
|
xyh 18 Mar 2015, 12:51
I have just written a web site for it ::
http://the-little-language-designer.github.io/ and :: http://the-little-language-designer.github.io/cicada-nymph/overview.html |
|||
18 Mar 2015, 12:51 |
|
nop 19 Mar 2015, 04:32
beware everyone this websites use lots of cpu time and maybe chews up memory with firefox
|
|||
19 Mar 2015, 04:32 |
|
nop 19 Mar 2015, 08:55
i already have java disabled for a long time
|
|||
19 Mar 2015, 08:55 |
|
revolution 19 Mar 2015, 08:59
I don't see any abnormal effect on my FF. Perhaps you have some other issue?
|
|||
19 Mar 2015, 08:59 |
|
nop 19 Mar 2015, 09:31
unlikely that we have the same firefox version with the same setup running on the same os so maybe you have some other issue also
|
|||
19 Mar 2015, 09:31 |
|
JohnFound 19 Mar 2015, 09:37
Quote: This also served as the material of an experimental assembly course, which I am teaching now in SUN YAT-SEN university of China Guangzhou; The FASM popularity in China universities is pretty interesting. Maybe someone have to translate the manual in Mandarin? Or someone has already done it? |
|||
19 Mar 2015, 09:37 |
|
revolution 19 Mar 2015, 10:00
nop wrote: unlikely that we have the same firefox version with the same setup running on the same os so maybe you have some other issue also |
|||
19 Mar 2015, 10:00 |
|
codestar 20 Mar 2015, 09:42
Hi. In your code...
Code: if linux? eq yes define sys_6_r8 r8 ; ... Code: define os linux ; ... define m 0 ; no match match =linux, os { ; … define m 1 ; yes, match } match =0 \ =windows, m os { ; else match. m=0 ; ... } Code: if m eq 0 'Error' ; intentional end if Quote: to teach my friends |
|||
20 Mar 2015, 09:42 |
|
xyh 23 Mar 2015, 06:18
an update of the website :
it is an incremental tutorial now to teach you how to implement a simple language's interpreter in FASM http://the-little-language-designer.github.io/cicada-nymph/intro/contents.html there are English documentations for it too only two part of the course is written in Chinese 1. notes computer architecture 2. basic assembler knowledge and the usage of FASM so, if you can read English then you will not miss anything important @nop about the page loading problem : loading is slow that is because of that the Chinese font is big (about 5M) @codestar about my misunderstanding of "if" : thank you very much ^-^ I will fix this problem latter |
|||
23 Mar 2015, 06:18 |
|
xyh 23 Mar 2015, 06:24
by the way
the incremental approach of the tutorial is learned from <An Incremental Approach to Compiler Construction> -- Abdulaziz Ghuloum https://github.com/namin/inc http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf |
|||
23 Mar 2015, 06:24 |
|
xyh 23 Mar 2015, 08:45
and I meet problems when runing the windows version of the interpreter.
on some windows machine it works fine while on other windows machine it does not in this case a cmd window will appear and disappear immediately I meet the same problem when try to run the cmd version of FASM on windows fasmw.exe always works fine but fasm.exe meets the same problem as cicada-nymph.exe any ideas ? |
|||
23 Mar 2015, 08:45 |
|
CampTheBoss 26 Mar 2015, 20:15
run it in cmd.exe
|
|||
26 Mar 2015, 20:15 |
|
xyh 26 Mar 2015, 21:59
@CampTheBoss
in the case of running them in cmd.exe on some windows machine it works fine while on other windows machine it does not in this case nothing will happen just like you type a <return> in to the cmd |
|||
26 Mar 2015, 21:59 |
|
CampTheBoss 27 Mar 2015, 07:06
Umm.. It might be a DOS application which 64 bit windows cant run
|
|||
27 Mar 2015, 07:06 |
|
xyh 27 Mar 2015, 15:44
@CampTheBoss
it is the FASM windows version and the interpreter written by me for 64-bits windows that are meeting this problem |
|||
27 Mar 2015, 15:44 |
|
xyh 30 Mar 2015, 04:12
@codestar
and I found that barcket : { } in Fasm can not be nested I consider this a bug |
|||
30 Mar 2015, 04:12 |
|
revolution 30 Mar 2015, 04:14
xyh wrote: and I found that barcket : { } in Fasm Code: macro x { rept 3 \{ ;do something \} } |
|||
30 Mar 2015, 04:14 |
|
xyh 30 Mar 2015, 20:04
@revolution
thanks is it one-level one-backslash ? so :: { \{ \\{ \\} \} } it would be nice if Fasm can handle nested barcket without using backslash. why it can not ? |
|||
30 Mar 2015, 20:04 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.