Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Intel 8008
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Code example 2=== The following 8008 assembly source code is for a simplified subroutine named MEMCPY2 that copies a block of data bytes from one location to another. By reducing the byte counter to 8 bits, there is enough room to load all the subroutine parameters into the 8008's register file. <!--This routine was assembled by brain and might contain errors--> {| | <pre> 002000 307 002001 206 015 004 002004 370 002005 206 015 004 002010 021 002011 110 000 004 002014 007 002015 316 002016 364 002017 341 002020 315 002021 353 002022 331 002023 040 002024 013 002025 030 002026 007 002027 </pre> | <syntaxhighlight lang="nasm"> ; MEMCPY2 -- ; Copy a block of memory from one location to another ; ; Entry parameters in registers ; HL: 14-bit address of source data block ; DE: 14-bit address of target data block ; C: 8-bit count of bytes to copy. (1 to 256 bytes) ORG 2000Q ;Code at 002000q MEMCPY2 LAM ;Read source byte into A CAL XCHGI ;Exchange HL<->DE and increment DE LMA ;Save A to target byte CAL XCHGI ;Exchange HL<->DE and increment DE DCC ;Decrement byte counter JFZ MEMCPY2 ;Continue for all bytes RET ;Exchange DE and HL register pairs then increment DE as 16 bits XCHGI LBL ;Exchange L and E LLE LEB LBH ;Exchange H and D LHD LDB INE ;Inc E, low byte of DE RFZ ;Return if no carry IND ;Otherwise inc high byte D RET END </syntaxhighlight> |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Intel 8008
(section)
Add topic