Why do the i8080 I/O instructions take a byte-sized operand to determine the port?Why did Pokémon Red have...
How many wires should be in a new thermostat cable?
Can the Conjure Barrage spell stack with the Disarming Attack or Trip Attack Battle Master maneuvers?
Is ideal gas incompressible?
How do you earn the reader's trust?
Congruence, Equal, and Equivalence
How to make Flex Markers appear in Logic Pro X?
Why "strap-on" boosters, and how do other people say it?
Are there historical examples of audiences drawn to a work that was "so bad it's good"?
Is there any mention of ghosts who live outside the Hogwarts castle?
Is it safe to redirect stdout and stderr to the same file without file descriptor copies?
If I arrive in the UK, and then head to mainland Europe, does my Schengen visa 90 day limit start when I arrived in the UK, or mainland Europe?
Coloring lines in a graph the same color if they are the same length
Is there an idiom that means that you are in a very strong negotiation position in a negotiation?
Download app bundles from App Store to run on iOS Emulator on Mac
How does the Earth's center produce heat?
Is being an extrovert a necessary condition to be a manager?
If a character has cast the Fly spell on themselves, can they "hand off" to the Levitate spell without interruption?
Nunc est bibendum: gerund or gerundive?
Why is Ni[(PPh₃)₂Cl₂] tetrahedral?
Existence of a model of ZFC in which the natural numbers are really the natural numbers
How could Dwarves prevent sand from filling up their settlements
(For training purposes) Are there any openings with rook pawns that are more effective than others (and if so, what are they)?
Why do testers need root cause analysis?
Ribbon Cable Cross Talk - Is there a fix after the fact?
Why do the i8080 I/O instructions take a byte-sized operand to determine the port?
Why did Pokémon Red have so many overflow bugs?DIY Project using 1970s 8-bit CPU, is it possible?What is the relative code density of 8-bit microprocessors?Why was the 8080's JumP immediate instruction placed where it was?Intel 8080 - Behaviour of the carry bit when comparing a value with 0The start of x86: Intel 8080 vs Intel 8086?Intel 8080 and Altair 8800. 256 I/0 ports, but only 7 free RST (interrupt subroutine) - how it works?What is the difference between an 8080 and an 8051?Comparing Signed Numbers on Z80 (8080) in AssemblyWhere can I find and download emulator of Altair 8800 with Intel 8080 processor for Windows?
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports. Doesn't that mean the instructions
IN d8 ; only index 0-7?
OUT d8
can only take 8 possible values? What would it be indexing otherwise?
8080
New contributor
add a comment |
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports. Doesn't that mean the instructions
IN d8 ; only index 0-7?
OUT d8
can only take 8 possible values? What would it be indexing otherwise?
8080
New contributor
add a comment |
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports. Doesn't that mean the instructions
IN d8 ; only index 0-7?
OUT d8
can only take 8 possible values? What would it be indexing otherwise?
8080
New contributor
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports. Doesn't that mean the instructions
IN d8 ; only index 0-7?
OUT d8
can only take 8 possible values? What would it be indexing otherwise?
8080
8080
New contributor
New contributor
New contributor
asked 7 hours ago
David TranDavid Tran
132
132
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports.
The 8080 does not have any I/O Ports. It's a microprocessor, not a microcontroller.
(Maybe the system you're playing with does have these 8+8 ports, but they are always external to the CPU)
The 8080 features a 16 bit data/program address space and an 8 bit I/O i/o address space. Or in other words it can address 64KiB of memory and 256 I/O locations. Each of them wit 8 Bit.
1
Which locations arein
and which areout
? Is it like 0-127 and 128-256 kinda thing?
– David Tran
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
add a comment |
The question of whether something is "memory" or "I/O" depends upon how it responds to various control signals. There is nothing that would prevent anyone from wiring an I/O device so that it would respond to a range of "memory" addresses, and for some kinds of I/O device that could be more useful than wiring it to the "I/O" read/write signals. On the other hand, an I/O device which is wired to behave as a memory device will respond to an instruction that writes to HL
whenever HL holds its address, without regard for whether HL was supposed to hold that address. An I/O device that response to I/O address 0x57 by contrast will only respond to an "out 57h" instruction, and the likelihood of the processor encountering that byte sequence by chance is smaller than the likelihood that HL might end up with a bogus address.
While it would have been possible to make the OUT nn
instruction take a two-byte address operand, that would have made the opcode bigger and slower while offering little benefit for most applications, especially given that the applications which would need more than 256 bytes of I/O space would also need to access I/O devices using register-based addresses and should thus likely be wired as "memory" devices.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "648"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
David Tran is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f11052%2fwhy-do-the-i8080-i-o-instructions-take-a-byte-sized-operand-to-determine-the-por%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports.
The 8080 does not have any I/O Ports. It's a microprocessor, not a microcontroller.
(Maybe the system you're playing with does have these 8+8 ports, but they are always external to the CPU)
The 8080 features a 16 bit data/program address space and an 8 bit I/O i/o address space. Or in other words it can address 64KiB of memory and 256 I/O locations. Each of them wit 8 Bit.
1
Which locations arein
and which areout
? Is it like 0-127 and 128-256 kinda thing?
– David Tran
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
add a comment |
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports.
The 8080 does not have any I/O Ports. It's a microprocessor, not a microcontroller.
(Maybe the system you're playing with does have these 8+8 ports, but they are always external to the CPU)
The 8080 features a 16 bit data/program address space and an 8 bit I/O i/o address space. Or in other words it can address 64KiB of memory and 256 I/O locations. Each of them wit 8 Bit.
1
Which locations arein
and which areout
? Is it like 0-127 and 128-256 kinda thing?
– David Tran
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
add a comment |
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports.
The 8080 does not have any I/O Ports. It's a microprocessor, not a microcontroller.
(Maybe the system you're playing with does have these 8+8 ports, but they are always external to the CPU)
The 8080 features a 16 bit data/program address space and an 8 bit I/O i/o address space. Or in other words it can address 64KiB of memory and 256 I/O locations. Each of them wit 8 Bit.
I thought the i8080 had 8 16-bit IN ports and 8 16-bit OUT ports.
The 8080 does not have any I/O Ports. It's a microprocessor, not a microcontroller.
(Maybe the system you're playing with does have these 8+8 ports, but they are always external to the CPU)
The 8080 features a 16 bit data/program address space and an 8 bit I/O i/o address space. Or in other words it can address 64KiB of memory and 256 I/O locations. Each of them wit 8 Bit.
edited 5 hours ago
answered 7 hours ago
RaffzahnRaffzahn
58.2k6142237
58.2k6142237
1
Which locations arein
and which areout
? Is it like 0-127 and 128-256 kinda thing?
– David Tran
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
add a comment |
1
Which locations arein
and which areout
? Is it like 0-127 and 128-256 kinda thing?
– David Tran
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
1
1
Which locations are
in
and which are out
? Is it like 0-127 and 128-256 kinda thing?– David Tran
7 hours ago
Which locations are
in
and which are out
? Is it like 0-127 and 128-256 kinda thing?– David Tran
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
No. it's an address space. Not ports. What responds to each address, and if its read only, write only or read/write depends on the I/O unit assigned to that address. Keep in mind, the 8080 is a microprocessor, not a microcontroller there are no build in ports.
– Raffzahn
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
Ahhh okay thank you. Makes sense now.
– David Tran
7 hours ago
add a comment |
The question of whether something is "memory" or "I/O" depends upon how it responds to various control signals. There is nothing that would prevent anyone from wiring an I/O device so that it would respond to a range of "memory" addresses, and for some kinds of I/O device that could be more useful than wiring it to the "I/O" read/write signals. On the other hand, an I/O device which is wired to behave as a memory device will respond to an instruction that writes to HL
whenever HL holds its address, without regard for whether HL was supposed to hold that address. An I/O device that response to I/O address 0x57 by contrast will only respond to an "out 57h" instruction, and the likelihood of the processor encountering that byte sequence by chance is smaller than the likelihood that HL might end up with a bogus address.
While it would have been possible to make the OUT nn
instruction take a two-byte address operand, that would have made the opcode bigger and slower while offering little benefit for most applications, especially given that the applications which would need more than 256 bytes of I/O space would also need to access I/O devices using register-based addresses and should thus likely be wired as "memory" devices.
add a comment |
The question of whether something is "memory" or "I/O" depends upon how it responds to various control signals. There is nothing that would prevent anyone from wiring an I/O device so that it would respond to a range of "memory" addresses, and for some kinds of I/O device that could be more useful than wiring it to the "I/O" read/write signals. On the other hand, an I/O device which is wired to behave as a memory device will respond to an instruction that writes to HL
whenever HL holds its address, without regard for whether HL was supposed to hold that address. An I/O device that response to I/O address 0x57 by contrast will only respond to an "out 57h" instruction, and the likelihood of the processor encountering that byte sequence by chance is smaller than the likelihood that HL might end up with a bogus address.
While it would have been possible to make the OUT nn
instruction take a two-byte address operand, that would have made the opcode bigger and slower while offering little benefit for most applications, especially given that the applications which would need more than 256 bytes of I/O space would also need to access I/O devices using register-based addresses and should thus likely be wired as "memory" devices.
add a comment |
The question of whether something is "memory" or "I/O" depends upon how it responds to various control signals. There is nothing that would prevent anyone from wiring an I/O device so that it would respond to a range of "memory" addresses, and for some kinds of I/O device that could be more useful than wiring it to the "I/O" read/write signals. On the other hand, an I/O device which is wired to behave as a memory device will respond to an instruction that writes to HL
whenever HL holds its address, without regard for whether HL was supposed to hold that address. An I/O device that response to I/O address 0x57 by contrast will only respond to an "out 57h" instruction, and the likelihood of the processor encountering that byte sequence by chance is smaller than the likelihood that HL might end up with a bogus address.
While it would have been possible to make the OUT nn
instruction take a two-byte address operand, that would have made the opcode bigger and slower while offering little benefit for most applications, especially given that the applications which would need more than 256 bytes of I/O space would also need to access I/O devices using register-based addresses and should thus likely be wired as "memory" devices.
The question of whether something is "memory" or "I/O" depends upon how it responds to various control signals. There is nothing that would prevent anyone from wiring an I/O device so that it would respond to a range of "memory" addresses, and for some kinds of I/O device that could be more useful than wiring it to the "I/O" read/write signals. On the other hand, an I/O device which is wired to behave as a memory device will respond to an instruction that writes to HL
whenever HL holds its address, without regard for whether HL was supposed to hold that address. An I/O device that response to I/O address 0x57 by contrast will only respond to an "out 57h" instruction, and the likelihood of the processor encountering that byte sequence by chance is smaller than the likelihood that HL might end up with a bogus address.
While it would have been possible to make the OUT nn
instruction take a two-byte address operand, that would have made the opcode bigger and slower while offering little benefit for most applications, especially given that the applications which would need more than 256 bytes of I/O space would also need to access I/O devices using register-based addresses and should thus likely be wired as "memory" devices.
answered 3 hours ago
supercatsupercat
8,7701144
8,7701144
add a comment |
add a comment |
David Tran is a new contributor. Be nice, and check out our Code of Conduct.
David Tran is a new contributor. Be nice, and check out our Code of Conduct.
David Tran is a new contributor. Be nice, and check out our Code of Conduct.
David Tran is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Retrocomputing Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f11052%2fwhy-do-the-i8080-i-o-instructions-take-a-byte-sized-operand-to-determine-the-por%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown