English
Regulars table & Café

Help Compiler Creation

 

GDL
Hallöle Community,

I me in the momentum on 2 projects concentrate, would like I the RVK Basic through what Own supplant.

what have I already:
- whom detailed Befehlsumfang from the Microcontrolern
- a functioning RVK Compiler (and accordingly a Presentation what from whom individual Basic-command in Assembler go should)

Wovon I at all none plan have
- How resolve one on the best nested command or Schleifenroutinen on
- How are one generally on the best to, there zeilenweises 1 To 1 Übersetzen not goes.

Perhaps can someone Schützenhilfe give.

the whole Although one utterly harter Brocken for me, but I will be not therefore herumkommen.

Grüßle
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
02/16/15  
 



You must hold to ASM dissolve.

so becomes z.B. a Variable a (in the drop sooner solid) SpeicherAdresse, z.B. a address in the Stack.

means var a=0
I need a variable a, means push 0 and Stackadresse remember in the
Kompilierer. And if somewhere a=22 standing, then something like How (now time
adopted 32bit)

push eax //eax on stack secure
push ebx //ebx on stack secure
mov eax,AdresseVonAImStack
mov ebx,22
mov [eax],22
pop ebx
pop eax

the can naturally kürzer, ought to mere one Image go.

which ASM this Microkontroller supported white I do not.

I wealth creep and ifs are sooner your question.

means one if set I by xpse to assembler circa sinnbildlich so:

if 10=20
//print
else
//exit
endif

becomes

push eax
push ebx
mov eax,10
mov ebx,20
cmp eax,ebx
pop eax
pop ebx
jne make001else
//print
jmp make001end
make001else:
//exit
make001end:
weiterimtext...

the would then one if.

creep are too only one if.

while 1<10
//print
wend

is indeed only

make002loop:
push eax
push ebx
mov eax,1
mov ebx,10
cmp eax,ebx
pop eax
pop ebx
JGE make002end
//print
jmp make002loop

Perhaps helps it you I with xpse beget, simply time whom asm look at.

thereafter can You whom ASM to Opcodes dissolve. tougher becomes
not as to ASM but since must You with whom Jumps even too
The Sprungweiten mind The according to CPU/ OS border having.
 
02/16/15  
 




GDL
Hi,

so far kapier I the Schonmal.
me GEHTS but To allererst time around the discern and evaluate the Presentation.

Extremfall:
If (((a+7)/2)-5)+(14/c) > something

Gibts there irgendeinen algorythmus or something around the correctly. To discern and then to point to strich under Beachtung the clinging aufzulösen.

or mulish The clinging of inside to outer work out?
 
XProfan X3
Windows7 Xprofan 8,9,10 [...]  [...] 
02/16/15  
 



the goes too well, write for beginning a function
parseArg(ument) - so GetControlParas (B too xpse "Profan"-Argumente to ASM:

example:

a=(10+20)+30

becomes:

tmp1=10+20 //Klammer in front+hinten can always weggeworfen go if only clinging
a=tmp+30

becomes

tmp1=10
add tmp1,20
a=tmp
add a,30

ergo find Klammerauf and nimm any characters To to korrespondierenden
Klammerzu. simply Zeichenweise parsen and with eachone new opened
Klammer simply a counter hochzählen and with of/ one Klammerzu whom counter
runtersetzen so too really The korrespondierende Klammer found becomes.

so becomes from
((10+20)*(30+40))
this:
(10+20)*(30+40)

because the Außenklammern simply again weggeworfen go can because
tappt im dunkeln korrespondieren.

so will need you a Klammernauflöser
and several Operatorenauflöser apply in the Order point, Strich

the whole name I gladly wrong Argumenteauflöser.

Nochmal:

a=((10+20)*(30+40))
becomes this:
a=(10+20)*(30+40)

because the Außenklammern simply again weggeworfen go can because
tappt im dunkeln korrespondieren.

then finds the Klammernauflöser again a klammer, integrally in front The.

then let[ed] it To to korrespondierenden Klammer everything one, finds means 10+20,
observe 10+20 and 10+20 becomes supplant in tmpX (X is a Zahlenwert the simply hochzählt, means tmp1, tmp2...)

Ergo

a=(10+20)*(30+40)

becomes

tmp1=10+20
a=tmp1*(30+40)

then: another Klammer in the argument? Yes, ergo finds the Klammernauflöser
(30+40) and supplant it in (this time) tmp2 and observes 30+40

Ergo:

tmp1=10+20
tmp2=30+40
a=tmp1*tmp2

another Klammer in the argument? No, means ex to that Operatorenauflöser for
Punktrechnung.

One Malzeichen in a=tmp1*tmp2? Yes, ergo linkes argument parsen = tmp1, right
argument tmp2.

Ergo:

tmp1=10+20
tmp2=30+40
tmp3=tmp1
mul tmp3,tmp2
a=tmp3

another Punktrechnungsoperator? No, ergo moreover to that Operatorenauflöser for
Strichrechnung (operates very How the Punktrechnungsoperatorenauflöser):

One plus found? Yes, z.B. in tmp1=10+20. again linkes and right argument
find, yields left 10 and right 20.

ergo, from:
tmp1=10+20

becomes

tmp4=10
add tmp4,20
tmp1=tmp4

next row is tmp2=30+40, again Strichrechner found, ergo dissolve:

from:
tmp2=30+40

becomes

tmp5=30
add tmp5,40
tmp2=tmp5

Then nirgends More one Operator found, ergo come out:

tmp4=10
add tmp4,20
tmp1=tmp4
tmp5=30
add tmp5,40
tmp2=tmp5
tmp3=tmp1
mul tmp3,tmp2
a=tmp3

the can slight to ASM brought go, beispiels 32bit asm:

but the had we Yes supra already.

is mist To explain, sorry.
 
02/16/15  
 




GDL
Hallöle,

erstmqal many Thanks for your working out.
Beautiful slow come I behind it what with RVK Singlepass1 and Singlepass2 To ..4 is.


is mist To explain, sorry


i know, institute of technology me too heavy The right ask To to put.
but I beiß me there now through.

Grüßle
Georg
 
XProfan X3
Windows7 Xprofan 8,9,10 [...]  [...] 
02/17/15  
 




GDL
Hallöle David,

come along. variables from code filter out goes already and the Vektortabellen for different Devices under Berücksichtigung the interrupts to create working already.
be now on the "Befehlerkennung" and its Umsetzung into Arbeitsregister.
with difficulty ernährt itself the Eichhörnchen.

Grüßle
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
02/26/15  
 




GDL
Hi,

@David: thanks for hints on the Tele.

first lauffähige Codes there already.
 
XProfan X3
Windows7 Xprofan 8,9,10 [...]  [...] 
03/14/15  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

7.107 Views

Untitledvor 0 min.
Sven Bader03/21/23
Ju02/24/17
iF12/30/15
Anfänger12/30/15
More...

Themeninformationen

this Topic has 2 subscriber:

GDL (5x)
iF (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie