Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Datapoint 2200
(section)
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=== The following Datapoint 2200 assembly source code is for a subroutine named MEMCPY that copies a block of data bytes from one location to another. Because the byte counter is only 8 bits, there is enough room to load all the subroutine parameters into the 2200's register file. Datapoint 2200 version I transfers 374 bytes per second using this routine. A 500 kHz Intel 8008 executes this code almost four times faster, transferring 1,479 bytes per second. Datapoint 2200 version II is much faster than either at 9,615 bytes per second.<ref name="2200ref">{{cite book |title=Datapoint 2200 Reference |date=1972 |publisher=Computer Terminal Corporation |url=http://www.bitsavers.org/pdf/datapoint/2200/2200_Reference_Manual.pdf |access-date=16 September 2024}}</ref><ref name="8008man" /> If more than an 8-bit count is needed, a more complicated copy routine with parameters held in memory would be required. <!--This routine was assembled by brain and might contain errors--> {| | <pre> 002000 317 002001 206 020 004 002004 371 002005 206 020 004 002010 302 002011 024 001 002013 320 002014 110 000 004 002017 007 002020 306 002021 364 002022 004 001 002024 340 002025 305 002026 353 002027 014 000 002031 330 002032 007 002032 </pre> | <syntaxhighlight lang="nasm"> ; MEMCPY -- ; Copy a block of memory from one location to another ; ; Entry parameters in registers ; HL: 13-bit address of source data block ; DE: 13-bit address of target data block ; C: 8-bit count of bytes to copy. (1 to 256 bytes) ORG 2000Q ;Code at 002000 octal MEMCPY LBM ;Read source byte into B CALL XCHGI ;Exchange HL<->DE and increment DE LMB ;Save B to target byte CALL XCHGI ;Exchange HL<->DE and increment DE LAC ;Decrement byte counter in C SU 1 LCA JFZ MEMCPY ;Continue for all bytes RETURN ;Exchange DE and HL register pairs then increment DE as 16 bits XCHGI LAL ;Exchange L and E LLE AD 1 ;and inc E, low byte of DE LEA LAH ;Exchange H and D LHD AC 0 ;proagate Cy into D LDA RETURN END </syntaxhighlight> |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)