Befehle werden aus einem Befehlskommandowort und Parametern gebildet. Mehrere Befehle können in einer Zeile angegeben werden, wenn diese durch Doppelpunkt [:] getrennt sind. Die Befehle sind:
sim84 name
Cmd :ss[Enter]
1 1=0086 movwf 6 ; 6 portb=0H
100 w=0H
6 portb=0H
1 tmr0=1H
Cmd [ss] :[Enter]
2 2=2807 goto 7H ; pc=6H 1 tmr0=2H
Cmd [ss] :
if b >= 24 then goto
M0
a = 2
goto M1
label M0
a = 3
label M1
Cmd :uint16_t zz
Cmd :sym
zz=uint16_t [0] =0
Cmd :sint32_t tt
Cmd :uint8_t t[2]
Cmd :sym
zz=uint16_t [0] =0
tt=sint32_t [0] =0
t=uint8_t [0][0] =0[1][0] =0
Cmd :
Cmd :print pc,cy
0 0
Cmd :ss
0 0000__vectors__vector_default__eeprom_end C014 rjmp $00000015
rjmp $0015
Cmd [ss] :ss
2 0015 2411 eor r1,r1 ;
PRE sram[1,0001] aliasr1alias r[1,01]
=0,00
sram[1,0001]
aliasr1alias r[1,01] =0,00
POST sram[1,0001] aliasr1alias r[1,01] =0,00
sram[95,005F]
aliassreg Status Registeralias io[63,3F] =2,02
Cmd [ss] :print pc,cy
22 3
Cmd :
Cmd :uint8_t t1
Cmd :sint32_t t2
Cmd :double tr
Cmd :t1 = 203
Cmd :t2 = -t1
Cmd :tr = 8.343+2
Cmd :sym
t1=uint8_t [0] =203
t2=sint32_t [0] =-203
tr=double [0] =10.34300
Cmd :
Cmd :t1 = 88
Cmd :di t1+40
080=0000H undefined
Cmd :double c1msec
Cmd :c1msec = 1000*f
Cmd :p c1msec
10000.000000
print hex$(r16),hex$(34),hex$(5*16+6),hex$(100*200*200)
00 22 00000056 003D0900
textv=hex$(zahl) | Hexadezimaldarstellung |
---|---|
uint8_tv=ubm(addresse) | Liest ein Byte aus dem Datenspeicher des Zielprozessors |
sint8_tv=sbm(addresse) | Liest ein Byte aus dem Datenspeicher des Zielprozessors |
uint16_tv=uwm(addresse) | Liest ein Wort aus dem Datenspeicher des Zielprozessors |
sint16_tv=swm(addresse) | Liest ein Wort aus dem Datenspeicher des Zielprozessors |
uint32_tv=ulm(addresse) | Liest ein Langes Wort aus dem Datenspeicher des Zielprozessors |
floatv=fm(addresse) | Liest eine Fließkommazahl (4 Bytes) aus dem Datenspeicher des Zielprozessors |
doublev=fm(addresse) | Liest ein Fließkommazahl (8 Bytes) aus dem Datenspeicher des Zielprozessors |
textv=tm(addresse) | Liest einen Textstring aus dem Datenspeicher des Zielprozessors |
uint8_tv=ubm(addresse) | (2007-04-14: geplant) Liest ein Byte aus dem Datenspeicher des Zielprozessors |
hr1.f = bresult
result_nan = 0
if (hr1.l & 0x7f800000L) == 0x7f800000 then if hr1.l &
0x007fffff then result_nan = 1
Beispiel:
Cmd :r28=45
Cmd :print r30;r28;r30
1 45 1
Cmd :p r28*r28
2025
text txtv1 ' Eine Zeichenkette für bis zu
80 Zeichen
text txtv2[4] ' Eine Zeichenkette für bis zu 4 Zeichen
text txterg
'
txtv1 = "abcdefg" ' assign a text string
txtv2 = "123456789"
txterg = txtv1 + txtv2
'
print "txtv1= ";txtv1;" txtv2= ";txtv2;" txterg= ";txterg
sym ' Alle Symbole anzeigen
txtv1= abcdefg txtv2= 1234 txterg= abcdefg1234
txtv1=text [0]*128 =[abcdefg]
txtv2=text [0]*5 =[1234]
txterg=text [0]*128 =[abcdefg1234]
x=uint16_t [0] =7
y=uint16_t [0] =9
z=uint16_t [0] =63
Cmd :d 0x18 0x23
0018 = 0 = 00 ; 0 = 00 ; 96 = 60 ; 0 = 00
001C = 95 = 5F ; 2 = 02 ; 0 = 00 ; 0 = 00
0020 = 0 = 00 ; 0 = 00 ; 0 = 00 ; 0 = 00
uint8_t sc
print "Starting"
label bis200
if cy > 200 then gobis At200
silentstep
goto bis200
label At200
print "I am at cycle 200"
end
Cmd :set radix hex
Cmd :l e,12
00000e b50c in rtmpl,TCNT1L ; Read 16 Bit Timer
00000f b51d in rtmph,TCNT1H
000010 1b02 sub rtmpl,rt1sl ; and subtract start value
000011 0b13 sbc rtmph,rt1sh ; rtiml,rtimh = elapsed time
Cmd :
Der Befehl:
com addrs
Weist einer Programmadresse einen Kommantar zu.
Beispiel:
Cmd :com 0x35
Comment for 35H ? here is the comment test text
ERROR :Komments changed, want to write back filename.kom ?
Press [Y]es [N]o Yes
Cmd :di 0x30 0x38
030=009BH movwf 1B
031=189BH btfsc 1B,1
032=151BH bsf 1B,2
033=3004H movlw 04
034=00A4H movwf 24
035=122BH bcf 2B,4 ;here is the comment test text
036=1005H bcf 05,0 ; PORTA
037=21F4H call 1F4
038=20C8H call 0C8
Cmd :set r 16
set radix hex
Cmd :r4=10-2
Cmd :r 0 7
00 = 00H= 0 ; 00H= 0 ; 00H= 0 ;
00H= 0
04 = 0EH= 14 ; 00H= 0 ; 00H= 0 ;
00H= 0
Cmd :set r 10
set radix dec
Cmd :r4=10-2
Cmd :r 0 7
00 = 00H= 0 ; 00H= 0 ; 00H= 0 ;
00H= 0
04 = 08H= 8 ; 00H= 0 ; 00H= 0 ;
00H= 0
Cmd :r 32 35
20 = 00H= 0 ; 00H= 0 ; 00H= 0 ;
00H= 0
Cmd :r 96 99
60 = 00H= 0 ; 00H= 0 ; 00H= 0 ;
00H= 0
Cmd :
b 5,pc==0x15
Here a breakpoint at condition variable pc equals 21 (hex:15) is
set.
b 5,pc==loop
Here the label is used instead the adress as numerical value.
b 5,pc==loop:print hex$(17),hex$(16)
Here the label is used instead the adress as numerical value. bp - PC
Breakpoints: the bp command
is a shortcut bis set a pc breakpoint.
Remember bis use 0x if the address is HEX
Example:
Cmd :bp 0xe
Cmd :b
Breakpoints are :
0: pc == 14 EH loop:
Cmd :e
Executing ... haltet by breakpoint
Sbispped cy=14, pc=E
Cmd :
pina = 3
pinb = pina * 2 + 0x1e
r 5:6
5 pina=3H 6 pinb=24H
print pina;pinb
3
36
See Expression