Changeset 10
- Timestamp:
- Aug 7, 2024, 12:12:42 AM (5 months ago)
- Location:
- branches/ByteArray
- Files:
-
- 1 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ByteArray/Assembler.pas
r9 r10 29 29 function ParseOrg: Boolean; 30 30 function ParseInstruction: Boolean; 31 function ParseInstructionParameter(ParamType: TParamType; Memory: TMemory): Boolean; 31 function ParseInstructionParameter(ParamType: TParamType; Memory: TMemory; 32 Offset: Integer): Boolean; 32 33 function ParseLabel: Boolean; 33 34 procedure UpdateLabelRefs; 34 function ParseNumParam( out Number: TInt): Boolean;35 function ParseNumParam(Offset: Integer; out Number: TInt): Boolean; 35 36 function ParseReg(out RegIndex: TRegIndex): Boolean; 36 37 function ParseDataWidth(out Size: TIntSize): Boolean; … … 96 97 end; 97 98 98 function TAssembler.ParseNumParam( out Number: TInt): Boolean;99 function TAssembler.ParseNumParam(Offset: Integer; out Number: TInt): Boolean; 99 100 var 100 101 Token: TToken; … … 116 117 Result := True; 117 118 end else begin 118 LabelRefs.Add(TLabelRef.Create(Token.Value, Memory.Position + 1 , Parser.Pos.Pos));119 LabelRefs.Add(TLabelRef.Create(Token.Value, Memory.Position + 1 + Offset, Parser.Pos.Pos)); 119 120 Number := 0; 120 121 Result := True; … … 252 253 Result := True; 253 254 while True do begin 254 if ParseNumParam( Number) then begin255 if ParseNumParam(0, Number) then begin 255 256 Memory.WritePos(1, Number); 256 257 end else begin … … 333 334 LastMessagesCount := Messages.Count; 334 335 ParamMemory.Clear; 335 if ParseInstructionParameter(ParamType, ParamMemory ) and336 if ParseInstructionParameter(ParamType, ParamMemory, InstructionMemory.Position) and 336 337 (LastMessagesCount = Messages.Count) then begin 337 338 ParamOk := True; … … 379 380 end; 380 381 381 function TAssembler.ParseInstructionParameter(ParamType: TParamType; Memory: TMemory): Boolean; 382 function TAssembler.ParseInstructionParameter(ParamType: TParamType; Memory: TMemory; 383 Offset: Integer): Boolean; 382 384 var 383 385 LastPos: TParserPos; … … 391 393 case ParamType of 392 394 ptData: begin 393 if ParseNumParam(Number) then Memory.WritePos(InstDataWidth, Number) 395 if ParseNumParam(Offset, Number) then 396 Memory.WritePos(InstDataWidth, Number) 394 397 else begin 395 398 Error(SExpectedNumber, Parser.Pos.Pos); … … 398 401 end; 399 402 ptAddress: begin 400 if ParseNumParam(Number) then Memory.WritePos(InstAddressWidth, Number) 403 if ParseNumParam(Offset, Number) then 404 Memory.WritePos(InstAddressWidth, Number) 401 405 else begin 402 406 Error(SExpectedNumber, Parser.Pos.Pos); … … 425 429 Memory.WritePos(1, Byte(RegIndex)); 426 430 if not Parser.Expect(tkSpecialSymbol, '+') then Result := False; 427 if ParseNumParam( Number) then Memory.WritePos(InstAddressWidth, Number)431 if ParseNumParam(Offset, Number) then Memory.WritePos(InstAddressWidth, Number) 428 432 else begin 429 433 Error(SExpectedNumericIndex, Parser.Pos.Pos); -
branches/ByteArray/Core.lfm
r5 r10 5 5 Height = 729 6 6 HorizontalOffset = 992 7 VerticalOffset = 6 537 VerticalOffset = 644 8 8 Width = 1074 9 9 PPI = 144 … … 93 93 OnExecute = AAboutExecute 94 94 end 95 object APowerOn: TAction 96 Caption = 'Power on' 97 OnExecute = APowerOnExecute 98 end 99 object APowerOff: TAction 100 Caption = 'Power off' 101 OnExecute = APowerOffExecute 102 end 103 object ARestart: TAction 104 Caption = 'Restart' 105 OnExecute = ARestartExecute 106 end 95 107 end 96 108 end -
branches/ByteArray/Core.lrj
r5 r10 12 12 {"hash":174433893,"name":"tcore.aconsole.caption","sourcebytes":[67,111,110,115,111,108,101],"value":"Console"}, 13 13 {"hash":213582195,"name":"tcore.asettings.caption","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"}, 14 {"hash":4691652,"name":"tcore.aabout.caption","sourcebytes":[65,98,111,117,116],"value":"About"} 14 {"hash":4691652,"name":"tcore.aabout.caption","sourcebytes":[65,98,111,117,116],"value":"About"}, 15 {"hash":115098670,"name":"tcore.apoweron.caption","sourcebytes":[80,111,119,101,114,32,111,110],"value":"Power on"}, 16 {"hash":230965926,"name":"tcore.apoweroff.caption","sourcebytes":[80,111,119,101,114,32,111,102,102],"value":"Power off"}, 17 {"hash":147499204,"name":"tcore.arestart.caption","sourcebytes":[82,101,115,116,97,114,116],"value":"Restart"} 15 18 ]} -
branches/ByteArray/Core.pas
r9 r10 16 16 AAbout: TAction; 17 17 AConsole: TAction; 18 ARestart: TAction; 19 APowerOff: TAction; 20 APowerOn: TAction; 18 21 ActionList1: TActionList; 19 22 ADebugger: TAction; … … 38 41 procedure AFullscreenExecute(Sender: TObject); 39 42 procedure AMemoryExecute(Sender: TObject); 43 procedure APowerOffExecute(Sender: TObject); 44 procedure APowerOnExecute(Sender: TObject); 45 procedure ARestartExecute(Sender: TObject); 40 46 procedure AScreenExecute(Sender: TObject); 41 47 procedure ASettingsExecute(Sender: TObject); … … 128 134 if not Assigned(FormConsole) then begin 129 135 FormConsole := TFormConsole.Create(nil); 130 Machine.Serial.OnWrite := FormConsole.ConsoleWrite;136 FormConsole.Serial := Machine.Serial; 131 137 end; 132 138 FormConsole.Show; … … 158 164 end; 159 165 FormMemory.Show; 166 end; 167 168 procedure TCore.APowerOffExecute(Sender: TObject); 169 begin 170 Machine.PowerOff; 171 end; 172 173 procedure TCore.APowerOnExecute(Sender: TObject); 174 begin 175 Machine.PowerOn; 176 end; 177 178 procedure TCore.ARestartExecute(Sender: TObject); 179 begin 180 Machine.PowerOff; 181 Machine.PowerOn; 160 182 end; 161 183 -
branches/ByteArray/Cpu.pas
r9 r10 157 157 procedure TCpu.Push(Value: TInt; Size: TIntSize); 158 158 begin 159 SP := SP -Size;159 SP := (SP - Size + Memory.GetSize) mod Memory.GetSize; 160 160 Memory.Write(SP, Size, Value); 161 161 end; … … 164 164 begin 165 165 Result := Memory.Read(SP, Size); 166 SP := SP +Size;166 SP := (SP + Size) mod Memory.GetSize; 167 167 end; 168 168 … … 740 740 I: TRegIndex; 741 741 begin 742 DataWidth := 1;743 AddressWidth := 1;742 DataWidth := 2; 743 AddressWidth := 2; 744 744 for I := Low(TRegIndex) to High(TRegIndex) do 745 745 Regs[I] := 0; -
branches/ByteArray/Devices/Memory.pas
r9 r10 32 32 procedure FillZero; 33 33 procedure Clear; 34 function ToString: string; override; 34 35 property Size: TInt read FSize write SetSize; 36 constructor Create; 35 37 destructor Destroy; override; 36 38 end; … … 144 146 end; 145 147 148 function TMemory.ToString: string; 149 var 150 I: Integer; 151 begin 152 Result := ''; 153 for I := 0 to FSize - 1 do 154 Result := Result + ', ' + IntToStr(FData[I]); 155 Delete(Result, 1, 2); 156 end; 157 158 constructor TMemory.Create; 159 begin 160 FSize := 0; 161 end; 162 146 163 destructor TMemory.Destroy; 147 164 begin -
branches/ByteArray/Devices/Serial.pas
r9 r10 4 4 5 5 uses 6 Classes, SysUtils, Device, Int, Channel ;6 Classes, SysUtils, Device, Int, Channel, syncobjs; 7 7 8 8 type 9 TReadEvent = function: Byte of object;10 TWriteEvent = procedure (Value: Byte) of object;11 12 9 { TSerial } 13 10 14 11 TSerial = class(TDevice) 15 12 private 16 FOnRead: TReadEvent; 17 FOnWrite: TWriteEvent; 13 FLock: TCriticalSection; 14 FOnInput: TNotifyEvent; 15 FOnOutput: TNotifyEvent; 16 InputBuffer: string; 17 OutputBuffer: string; 18 function ReadData(Size: TIntSize): TInt; 19 function ReadInputBufferCount(Size: TIntSize): TInt; 20 function ReadOutputBufferCount(Size: TIntSize): TInt; 21 procedure WriteData(Size: TIntSize; Value: TInt); 22 procedure WriteInputBufferCount(Size: TIntSize; Value: TInt); 23 procedure WriteOutputBufferCount(Size: TIntSize; Value: TInt); 18 24 public 19 function ReadData(Size: TIntSize): TInt; 20 procedure WriteData(Size: TIntSize; Value: TInt); 25 constructor Create; 26 destructor Destroy; override; 27 function ReadOutputBuffer: string; 28 procedure WriteInputBuffer(Text: string); 21 29 function GetHandlers: THandlers; override; 22 property On Write: TWriteEvent read FOnWrite write FOnWrite;23 property On Read: TReadEvent read FOnRead write FOnRead;30 property OnOutput: TNotifyEvent read FOnOutput write FOnOutput; 31 property OnInput: TNotifyEvent read FOnInput write FOnInput; 24 32 end; 25 33 … … 31 39 function TSerial.ReadData(Size: TIntSize): TInt; 32 40 begin 33 if Assigned(FOnRead) then Result := FOnRead; 41 FLock.Acquire; 42 try 43 if Length(InputBuffer) > 0 then begin 44 Result := Ord(InputBuffer[1]); 45 Delete(InputBuffer, 1, 1); 46 end; 47 finally 48 FLock.Release; 49 end; 50 end; 51 52 function TSerial.ReadInputBufferCount(Size: TIntSize): TInt; 53 begin 54 FLock.Acquire; 55 try 56 Result := Length(InputBuffer); 57 finally 58 FLock.Release; 59 end; 60 end; 61 62 function TSerial.ReadOutputBufferCount(Size: TIntSize): TInt; 63 begin 64 FLock.Acquire; 65 try 66 Result := Length(OutputBuffer); 67 finally 68 FLock.Release; 69 end; 34 70 end; 35 71 36 72 procedure TSerial.WriteData(Size: TIntSize; Value: TInt); 37 73 begin 38 if Assigned(FOnWrite) then FOnWrite(Value); 74 FLock.Acquire; 75 try 76 OutputBuffer := OutputBuffer + Chr(Value); 77 finally 78 FLock.Release; 79 end; 80 end; 81 82 procedure TSerial.WriteInputBufferCount(Size: TIntSize; Value: TInt); 83 begin 84 FLock.Acquire; 85 try 86 InputBuffer := ''; 87 finally 88 FLock.Release; 89 end; 90 end; 91 92 procedure TSerial.WriteOutputBufferCount(Size: TIntSize; Value: TInt); 93 begin 94 FLock.Acquire; 95 try 96 OutputBuffer := ''; 97 finally 98 FLock.Release; 99 end; 100 end; 101 102 constructor TSerial.Create; 103 begin 104 FLock := TCriticalSection.Create; 105 OutputBuffer := ''; 106 InputBuffer := ''; 107 end; 108 109 destructor TSerial.Destroy; 110 begin 111 FreeAndNil(FLock); 112 inherited; 113 end; 114 115 function TSerial.ReadOutputBuffer: string; 116 begin 117 FLock.Acquire; 118 try 119 Result := OutputBuffer; 120 OutputBuffer := ''; 121 finally 122 FLock.Release; 123 end; 124 end; 125 126 procedure TSerial.WriteInputBuffer(Text: string); 127 begin 128 FLock.Acquire; 129 try 130 InputBuffer := InputBuffer + Text; 131 finally 132 FLock.Release; 133 end; 39 134 end; 40 135 … … 43 138 Result := THandlers.Create; 44 139 Result.ReadHandlers.Add(ReadData); 140 Result.ReadHandlers.Add(ReadOutputBufferCount); 141 Result.ReadHandlers.Add(ReadOutputBufferCount); 45 142 Result.WriteHandlers.Add(WriteData); 143 Result.WriteHandlers.Add(WriteInputBufferCount); 144 Result.WriteHandlers.Add(WriteOutputBufferCount); 46 145 end; 47 146 -
branches/ByteArray/Forms/FormConsole.lfm
r5 r10 1 1 object FormConsole: TFormConsole 2 Left = 7 802 Left = 779 3 3 Height = 689 4 Top = 3 994 Top = 375 5 5 Width = 1002 6 6 Caption = 'Console' … … 8 8 ClientWidth = 1002 9 9 DesignTimePPI = 144 10 LCLVersion = ' 2.2.6.0'10 LCLVersion = '3.4.0.0' 11 11 object Memo1: TMemo 12 12 Left = 0 … … 20 20 TabOrder = 0 21 21 end 22 object Timer1: TTimer 23 Interval = 100 24 OnTimer = Timer1Timer 25 Left = 314 26 Top = 160 27 end 22 28 end -
branches/ByteArray/Forms/FormConsole.pas
r5 r10 4 4 5 5 uses 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Device; 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, 7 Device, Serial; 7 8 8 9 type … … 12 13 TFormConsole = class(TFormDevice) 13 14 Memo1: TMemo; 15 Timer1: TTimer; 16 procedure Timer1Timer(Sender: TObject); 17 private 18 FSerial: TSerial; 19 procedure SetSerial(AValue: TSerial); 14 20 public 15 pro cedure ConsoleWrite(Data: Byte);21 property Serial: TSerial read FSerial write SetSerial; 16 22 end; 17 23 … … 21 27 {$R *.lfm} 22 28 23 procedure TFormConsole. ConsoleWrite(Data: Byte);29 procedure TFormConsole.Timer1Timer(Sender: TObject); 24 30 begin 25 Memo1.Lines.Text := Memo1.Lines.Text + Chr(Data); 31 Memo1.Lines.Text := Memo1.Lines.Text + FSerial.ReadOutputBuffer; 32 end; 33 34 procedure TFormConsole.SetSerial(AValue: TSerial); 35 begin 36 if FSerial = AValue then Exit; 37 if Assigned(FSerial) then begin 38 FSerial.OnOutput := nil; 39 end; 40 FSerial := AValue; 41 if Assigned(FSerial) then begin 42 Memo1.Lines.Text := FSerial.ReadOutputBuffer; 43 end; 26 44 end; 27 45 -
branches/ByteArray/Forms/FormMemory.lfm
r5 r10 1 1 object FormMemory: TFormMemory 2 Left = 70 62 Left = 705 3 3 Height = 866 4 Top = 3114 Top = 287 5 5 Width = 1150 6 6 Caption = 'Memory' … … 8 8 ClientWidth = 1150 9 9 DesignTimePPI = 144 10 Menu = MainMenu1 10 11 OnShow = FormShow 11 LCLVersion = ' 2.2.6.0'12 LCLVersion = '3.4.0.0' 12 13 object ListViewMemory: TListView 13 14 Left = 8 … … 45 46 Top = 205 46 47 end 48 object MainMenu1: TMainMenu 49 Left = 246 50 Top = 252 51 object MenuItem1: TMenuItem 52 Caption = 'Tools' 53 object MenuItemClear: TMenuItem 54 Caption = 'Clear' 55 OnClick = MenuItemClearClick 56 end 57 end 58 end 47 59 end -
branches/ByteArray/Forms/FormMemory.lrj
r5 r10 3 3 {"hash":128683235,"name":"tformmemory.listviewmemory.columns[0].caption","sourcebytes":[65,100,100,114,101,115,115],"value":"Address"}, 4 4 {"hash":305313,"name":"tformmemory.listviewmemory.columns[1].caption","sourcebytes":[68,97,116,97],"value":"Data"}, 5 {"hash":4618201,"name":"tformmemory.listviewmemory.columns[2].caption","sourcebytes":[65,83,67,73,73],"value":"ASCII"} 5 {"hash":4618201,"name":"tformmemory.listviewmemory.columns[2].caption","sourcebytes":[65,83,67,73,73],"value":"ASCII"}, 6 {"hash":5989939,"name":"tformmemory.menuitem1.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"}, 7 {"hash":4860802,"name":"tformmemory.menuitemclear.caption","sourcebytes":[67,108,101,97,114],"value":"Clear"} 6 8 ]} -
branches/ByteArray/Forms/FormMemory.pas
r5 r10 5 5 uses 6 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls, 7 Me mory, Common.FormEx;7 Menus, Memory, Common.FormEx; 8 8 9 9 type … … 13 13 TFormMemory = class(TFormEx) 14 14 ListViewMemory: TListView; 15 MainMenu1: TMainMenu; 16 MenuItem1: TMenuItem; 17 MenuItemClear: TMenuItem; 15 18 Timer1: TTimer; 16 19 procedure FormShow(Sender: TObject); 17 20 procedure ListViewMemoryData(Sender: TObject; Item: TListItem); 21 procedure MenuItemClearClick(Sender: TObject); 18 22 procedure Timer1Timer(Sender: TObject); 19 23 public … … 58 62 end; 59 63 64 procedure TFormMemory.MenuItemClearClick(Sender: TObject); 65 begin 66 Memory.FillZero; 67 Reload; 68 end; 69 60 70 procedure TFormMemory.FormShow(Sender: TObject); 61 71 begin -
branches/ByteArray/Forms/FormScreen.lfm
r5 r10 5 5 Width = 931 6 6 Caption = 'Screen' 7 ClientHeight = 6 427 ClientHeight = 676 8 8 ClientWidth = 931 9 9 DesignTimePPI = 144 … … 11 11 OnClose = FormClose 12 12 OnShow = FormShow 13 LCLVersion = ' 2.2.6.0'13 LCLVersion = '3.4.0.0' 14 14 object Image1: TImage 15 15 Left = 0 16 Height = 6 4216 Height = 676 17 17 Top = 0 18 18 Width = 931 … … 37 37 end 38 38 end 39 object MenuItem2: TMenuItem 40 Caption = 'Tools' 41 object MenuItem10: TMenuItem 42 Action = Core.ASettings 43 end 44 object Separator2: TMenuItem 45 Caption = '-' 46 end 47 object MenuItem3: TMenuItem 48 Action = Core.ASourceEditor 49 end 50 object MenuItem5: TMenuItem 51 Action = Core.ADebugger 52 end 53 object MenuItem8: TMenuItem 54 Action = Core.ADisassembler 55 end 56 end 57 object MenuItem13: TMenuItem 58 Caption = 'Execution' 59 object MenuItem14: TMenuItem 60 Action = Core.APowerOn 61 end 62 object MenuItem15: TMenuItem 63 Action = Core.APowerOff 64 end 65 object MenuItem16: TMenuItem 66 Action = Core.ARestart 67 end 68 end 39 69 object MenuItem1: TMenuItem 40 70 Caption = 'View' … … 55 85 end 56 86 end 57 object MenuItem2: TMenuItem58 Caption = 'Tools'59 object MenuItem10: TMenuItem60 Action = Core.ASettings61 end62 object Separator2: TMenuItem63 Caption = '-'64 end65 object MenuItem3: TMenuItem66 Action = Core.ASourceEditor67 end68 object MenuItem5: TMenuItem69 Action = Core.ADebugger70 end71 object MenuItem8: TMenuItem72 Action = Core.ADisassembler73 end74 end75 87 object MenuItem11: TMenuItem 76 88 Caption = 'Help' -
branches/ByteArray/Forms/FormScreen.lrj
r5 r10 2 2 {"hash":94014398,"name":"tformscreen.caption","sourcebytes":[83,99,114,101,101,110],"value":"Screen"}, 3 3 {"hash":315429,"name":"tformscreen.menuitem4.caption","sourcebytes":[70,105,108,101],"value":"File"}, 4 {"hash":5989939,"name":"tformscreen.menuitem2.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"}, 5 {"hash":195880126,"name":"tformscreen.menuitem13.caption","sourcebytes":[69,120,101,99,117,116,105,111,110],"value":"Execution"}, 4 6 {"hash":380871,"name":"tformscreen.menuitem1.caption","sourcebytes":[86,105,101,119],"value":"View"}, 5 {"hash":5989939,"name":"tformscreen.menuitem2.caption","sourcebytes":[84,111,111,108,115],"value":"Tools"},6 7 {"hash":322608,"name":"tformscreen.menuitem11.caption","sourcebytes":[72,101,108,112],"value":"Help"} 7 8 ]} -
branches/ByteArray/Forms/FormScreen.pas
r5 r10 18 18 MenuItem11: TMenuItem; 19 19 MenuItem12: TMenuItem; 20 MenuItem13: TMenuItem; 21 MenuItem14: TMenuItem; 22 MenuItem15: TMenuItem; 23 MenuItem16: TMenuItem; 20 24 MenuItem2: TMenuItem; 21 25 MenuItem3: TMenuItem; -
branches/ByteArray/Instructions.pas
r5 r10 107 107 AddNew(inSubSize, 'SUB', [ptDataWidth, ptReg, ptReg], 'Subtracts second register from first register.'); 108 108 AddNew(inInput, 'IN', [ptReg, ptRegIndirect], 'Reads value from input port to register.'); 109 AddNew(inInputSize, 'IN', [ptDataWidth, ptReg, ptRegIndirect], 'Reads value from input port to register.'); 109 110 AddNew(inOutput, 'OUT', [ptRegIndirect, ptReg], 'Writes value from register to output port.'); 111 AddNew(inOutputSize, 'OUT', [ptDataWidth, ptRegIndirect, ptReg], 'Writes value from register to output port.'); 110 112 AddNew(inJumpZero, 'JZ', [ptReg, ptAddress], 'Jumps to given address if value of register is zero'); 111 113 AddNew(inJumpNotZero, 'JNZ', [ptReg, ptAddress], 'Jumps to given address if value of register is not zero'); -
branches/ByteArray/Languages/ByteArray.cs.po
r5 r10 164 164 msgstr "Paměť" 165 165 166 #: tcore.apoweroff.caption 167 msgid "Power off" 168 msgstr "" 169 170 #: tcore.apoweron.caption 171 msgid "Power on" 172 msgstr "" 173 166 174 #: tcore.applicationinfo1.description 167 175 msgid "Virtual machine and development environment" 168 176 msgstr "Virtuální počítač a vývojové prostředí" 177 178 #: tcore.arestart.caption 179 msgid "Restart" 180 msgstr "" 169 181 170 182 #: tcore.ascreen.caption … … 192 204 msgstr "" 193 205 206 #: tformconsole.caption 207 #, fuzzy 208 msgctxt "tformconsole.caption" 209 msgid "Console" 210 msgstr "Konzola" 211 194 212 #: tformdebugger.caption 195 213 msgctxt "tformdebugger.caption" … … 222 240 msgstr "ASCII" 223 241 242 #: tformmemory.menuitem1.caption 243 #, fuzzy 244 msgctxt "tformmemory.menuitem1.caption" 245 msgid "Tools" 246 msgstr "Nástroje" 247 248 #: tformmemory.menuitemclear.caption 249 msgid "Clear" 250 msgstr "" 251 224 252 #: tformscreen.caption 225 253 msgctxt "tformscreen.caption" … … 237 265 msgstr "Nápověda" 238 266 267 #: tformscreen.menuitem13.caption 268 msgid "Execution" 269 msgstr "" 270 239 271 #: tformscreen.menuitem2.caption 240 272 msgctxt "tformscreen.menuitem2.caption" -
branches/ByteArray/Languages/ByteArray.pot
r5 r10 154 154 msgstr "" 155 155 156 #: tcore.apoweroff.caption 157 msgid "Power off" 158 msgstr "" 159 160 #: tcore.apoweron.caption 161 msgid "Power on" 162 msgstr "" 163 156 164 #: tcore.applicationinfo1.description 157 165 msgid "Virtual machine and development environment" 166 msgstr "" 167 168 #: tcore.arestart.caption 169 msgid "Restart" 158 170 msgstr "" 159 171 … … 182 194 msgstr "" 183 195 196 #: tformconsole.caption 197 msgctxt "tformconsole.caption" 198 msgid "Console" 199 msgstr "" 200 184 201 #: tformdebugger.caption 185 202 msgctxt "tformdebugger.caption" … … 212 229 msgstr "" 213 230 231 #: tformmemory.menuitem1.caption 232 msgctxt "tformmemory.menuitem1.caption" 233 msgid "Tools" 234 msgstr "" 235 236 #: tformmemory.menuitemclear.caption 237 msgid "Clear" 238 msgstr "" 239 214 240 #: tformscreen.caption 215 241 msgctxt "tformscreen.caption" … … 227 253 msgstr "" 228 254 255 #: tformscreen.menuitem13.caption 256 msgid "Execution" 257 msgstr "" 258 229 259 #: tformscreen.menuitem2.caption 230 260 msgctxt "tformscreen.menuitem2.caption" -
branches/ByteArray/Sample.asm
r5 r10 32 32 33 33 Start: 34 LD R0, 64 35 LD R1, 8 36 OUT (R1), R0 37 LD R1, 0 38 LD R2, 10 39 OUT (R1), R0 40 Loop: 41 INC R0 42 DEC R2 43 JNZ R2, Loop 34 LD R0, Hello 35 LD R1, 12 36 CALL WriteStr 37 38 ;LD R0, 64 39 ;LD R1, 8 40 ;OUT (R1), R0 41 ;LD R1, 0 42 ;LD R2, 10 43 ;OUT (R1), R0 44 ;Loop: 45 ;INC R0 46 ;DEC R2 47 ;JNZ R2, Loop 44 48 HALT 45 49 … … 52 56 LD R3, ConsoleWriteChar 53 57 WriteStrLoop: 54 LD R2, (R0)55 OUT (R3), R258 LD D1, R2, (R0) 59 OUT D1, (R3), R2 56 60 INC R0 57 61 DEC R1
Note:
See TracChangeset
for help on using the changeset viewer.