Changeset 15
- Timestamp:
- Nov 6, 2025, 10:51:17 PM (25 hours ago)
- Location:
- branches/test2
- Files:
-
- 2 edited
-
Cpu.pas (modified) (1 diff)
-
FormMain.pas (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/test2/Cpu.pas
r14 r15 20 20 opSetBit, opResetBit); 21 21 22 TData = Cardinal;22 TData = Integer; 23 23 24 24 TInstruction = record -
branches/test2/FormMain.pas
r14 r15 44 44 const 45 45 Value0 = 0; 46 Value1 = 0;46 Value1 = 1; 47 47 Port0 = 0; 48 Port1 = 1; 49 var 50 Label0: Integer; 48 51 begin 49 52 with Cpu do begin … … 55 58 AddInstruction(opSet, Value1, 5); 56 59 AddInstruction(opAdd, Value0, Value1); 60 AddInstruction(opOutput, Port1, Value0); 61 62 AddInstruction(opSet, Value0, 20); 63 AddInstruction(opSet, Value1, 10); 64 Label0 := Instructions.Count; 57 65 AddInstruction(opOutput, Port0, Value0); 66 AddInstruction(opIncrement, Value0); 67 AddInstruction(opDecrement, Value1); 68 AddInstruction(opJumpRelativeNotZero, Label0 - Instructions.Count - 1, Value1); 69 58 70 AddInstruction(opTerminate); 59 71 SetLength(Memory, 10000);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/portvm/chrome/site/your_project_logo.png)