From ba4ef2bfd07be3ec9a0ff0f167755d0f239b9d5c Mon Sep 17 00:00:00 2001 From: Test_User Date: Sun, 19 Mar 2023 10:58:54 -0400 Subject: Add data transfer instructions --- cpu/instructions/transfer/exchange.txt | 10 ++++++++++ cpu/instructions/transfer/move.txt | 10 ++++++++++ cpu/instructions/transfer/pop.txt | 11 +++++++++++ cpu/instructions/transfer/push.txt | 11 +++++++++++ cpu/instructions/transfer/push_pop_notes.txt | 2 ++ 5 files changed, 44 insertions(+) create mode 100644 cpu/instructions/transfer/exchange.txt create mode 100644 cpu/instructions/transfer/move.txt create mode 100644 cpu/instructions/transfer/pop.txt create mode 100644 cpu/instructions/transfer/push.txt create mode 100644 cpu/instructions/transfer/push_pop_notes.txt diff --git a/cpu/instructions/transfer/exchange.txt b/cpu/instructions/transfer/exchange.txt new file mode 100644 index 0000000..de55413 --- /dev/null +++ b/cpu/instructions/transfer/exchange.txt @@ -0,0 +1,10 @@ +Number of parameters: 2 + +Usage: + exchange + +Effect: + Atomically (from a multi-cpu perspective) sets to , and to + +Exceptions: + None diff --git a/cpu/instructions/transfer/move.txt b/cpu/instructions/transfer/move.txt new file mode 100644 index 0000000..c17a4db --- /dev/null +++ b/cpu/instructions/transfer/move.txt @@ -0,0 +1,10 @@ +Number of parameters: 2 + +Usage: + move + +Effect: + Sets to + +Exceptions: + None diff --git a/cpu/instructions/transfer/pop.txt b/cpu/instructions/transfer/pop.txt new file mode 100644 index 0000000..e895022 --- /dev/null +++ b/cpu/instructions/transfer/pop.txt @@ -0,0 +1,11 @@ +Number of parameters: 1 + +Usage: + pop + +Effect: + Sets to [SP], then increments SP by sizeof + See ./push_pop_notes.txt + +Exceptions: + Stack error if [SP] is not readable diff --git a/cpu/instructions/transfer/push.txt b/cpu/instructions/transfer/push.txt new file mode 100644 index 0000000..9ea7f10 --- /dev/null +++ b/cpu/instructions/transfer/push.txt @@ -0,0 +1,11 @@ +Number of parameters: 1 + +Usage: + push + +Effect: + Decrements SP by sizeof , then sets [SP] to + See ./push_pop_notes.txt + +Exceptions: + Stack error if [SP] is not writable diff --git a/cpu/instructions/transfer/push_pop_notes.txt b/cpu/instructions/transfer/push_pop_notes.txt new file mode 100644 index 0000000..ae64f95 --- /dev/null +++ b/cpu/instructions/transfer/push_pop_notes.txt @@ -0,0 +1,2 @@ +Exact value to use for SP during push/pop instructions within the same queue is to be considered as if each push/pop instrction were executed sequentially according to their placement in the instruction queue +Resulting SP written in the end is to be the sum of all changes from executed push/pop instructions in the queue -- cgit v1.2.3