CP CPM Technické informace

Procházejte online nebo si stáhněte Technické informace pro Míchačky CP CPM. CP CPM System information Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk

Shrnutí obsahu

Strany 1

DIGITALRESEARCH TMCP/MOperating SystemManualCP/M Features and Facilities The CP/M Editor

Strany 2

Any or all of the CP/M component subsystems can be overlaid by an executing program. That is,once a user's program is loaded into the TPA, the CC

Strany 3

3.5.6 Control InstructionsThe four remaining instructions, categorized as control instructions, are the following: -HLT halts the 8080 processor

Strany 4

Table 3-9. (continued) Error Code Meaning R Register error: the value specified as a register is not compatible with the operatio

Strany 5

3.7 A Sample SessionThe following sample session shows interaction with the assembler and debugger in thedevelopment of a simple assembly-language pro

Strany 6

0110 214601 LXI H,SW ;CHECK FOR ZERO SWITCHES0113 7EB7C2000001 MOV A,M! OR A! JNZ SORT ; END OF SORT IF SW=0 ;0118 FF

Strany 7

:10010000214601360121470136007EFE09D2190140:100110002146017EB7C20001FF5F16002148011988:10012000194E79234623965778239EDA3F01B2CAA7:100130003F0156702B5E

Strany 8

010D JC 119 Change to jump on carry0110-xpP=010B 100 Reset program counter back to beginning of program-T10

Strany 9

0118 RST 07 List more0119 MOV E,A011A MVI D,00011C LXI H,0148 Abort list with rubout-G,11B Start

Strany 10

010D JC 1190110-L100 List starting section of program0100 LXI H,01460103 MVI M,010105 LXI H,01470108 MVI M,00-Abort list with

Strany 11

a>ED SORT.ASM Make changes to original program (the caret,^, indicates a control charac

Strany 12

A>DDT SORT.HEX Test program changes16K DDT VER 1.0NEXT PC015C 0000-G100*0118-D148 Data sorted0148 05 00 07 00 14 00 1

Strany 13

Most of the commands reference a particular file or group of files. The form of a file reference isspecified in Section 1.2.2.1.2.2 File ReferencesA f

Strany 14

Section 4CP/M Dynamic Debugging Tool4.1 IntroductionThe DDT program allows dynamic interactive testing and debugging of programs generated inthe CP/M

Strany 15

Following the sign-on message, DDT prompts you with the hyphen character, -, and waits forinput commands from the console. You can type any of severa

Strany 16

Table 4-2. (continued) Command Character Result A enters assembly-language mnemonics with operands. S substitutes mem

Strany 17

4.2 DDT CommandsThe individual commands are detailed below. In each case, the operator must wait for the hyphenprompt character before entering the co

Strany 18

4.2.2 The D (Display) CommandThe D command allows you to view the contents of memory in hexadecimal and ASCII formats.The D command takes the forms:DD

Strany 19

4.2.4 The G (Go) CommandA program is executed using the G command, with up to two optional breakpoint addresses. TheG command takes the forms:GGsGs,bG

Strany 20

where d is the stop address. The machine state can be examined at this point using the X(Examine) command. You must specify breakpoints that differ fr

Strany 21

4.2.7 The M (Move) CommandThe M command allows block movement of program or data areas from one location to anotherin memory. The M command takes the

Strany 22

Whenever the R command is issued, DDT responds with either the error indicator ? (file cannotbe opened, or a checksum error occurred in a HEX file) or

Strany 23

The second form of the T command is similar to the first, except that execution is traced for nsteps (n is a hexadecimal value) before a program break

Strany 24

matches the following unambiguous filenamesXYZ.COMandX3Z.CAMThe wildcard character can also be used in an ambiguous file reference. The * character re

Strany 25

Table 4-3. CPU Registers Register Meaning Value C Carry flag (0/1) Z Zero flag

Strany 26

In particular, the BDOS address at location 6H (address field of the JMP instruction at location5H) is modified by DDT to address the base location of

Strany 27

MOV A, C ;GET LARGEST VALUESTA LARGEJMP 0 ;REBOOT;; TEST DATAVECT; DB 2,0,4,3,5,6,1,5LEN EQU 4-VECT ;LENGTHLARGE; DS 1 ;LARGEST VALUE ON EXITEND^-Z*BO

Strany 28

A>ASM, SCANCP/M ASSEMBLER - VER 1.00122002H USE FACTOREND OF ASSEMBLY Assembly complete; look at program listingA>TYPE SCAN PRNCode address

Strany 29

A>DDT SCAN. HEX Start debugger using hex format machine codeDDT VER 1.0NEXT PC Next instruction0121 0000 to execute at-X PC = 0|COZOMOEOIO A=00

Strany 30

0113 STA 01210116 JMP 00000119 STAX B A little more machine011A NOP code. Note that pro-011B INR B ram ends at location011C IN

Strany 31

Trace one step again (note 08H in B)COZOMOEOIO A=00 B=0800 D=0000 H=0000 S=0100 P=0102 MVI C,00*0104-TTrace again (Register C is cleared)COZOMEO

Strany 32

CPU state at end of U5COZOMOE1I1 A=04 B=0600 D=0000 H=001B S=0100 P=0108 SUB C-G Run program from current PC until completion (in real-time)*0116 br

Strany 33

Trace 10 (hexadecimal) stepsC0Z1M0E1I1 A-00 B-0800 D=0000 H=0121 S=0100 P=0100 MVI B,08C0Z1M0E1I1 A-00 B-0000 D=0000 H=0121 S=0100 P=0102 MVI C,00C0Z1

Strany 34

-L100 List some code0100 MVI B,080102 MVI C,000104 LXI H,01190107 MOV A,M0108 SUB C0109 JC 010D Previous patch is present in X.COM010C MOV C,A010

Strany 35

Similarly, the commandA>DIR X?Y.C?Mcauses a search for all unambiguous filenames on the disk that satisfy this ambiguous reference.The following fi

Strany 36

*0108-X / Next data itemC1ZOMOE1I1 A=04 B=0602 D=0000 H=011B S=0100 P=0108 SUB C-TSingle step for a few cyclesC1ZOMOE1I1 A=04 B=0602 D=0000 H=011B

Strany 37

-L1000111 MVI B,080102 MVI C,000104 LXI H,01190107 MOV A,M0108 SUB C0109 JC 010D010C MOV C,A010D INX H010E JNZ 01070112 MOV A,C-L0113 STA 01210116 RST

Strany 38

/ Base address of data setC0Z1M0E1I1 A-03 B-0800 D=0000 H=0119 S=0100 P=0107 MOV A,M*0108-T / First data item brought to AC0Z1M0E1I1 A-02 B-0800 D=0

Strany 39

0111 MVI B,080102 MVI C,000104 LXI H,01190107 MOV A,M0108 SUB C <-- This should have been a CMP so that register A0109 JC 010D would not be dest

Strany 40

*0116-XCC1-XC1Z1M0E1I1 A=06 B=0006 D=0000 H=0121 S=0100 P=0116 RST 07-S121 Look at "large" - it appears to be correct.0121 060122 000123 22-

Strany 41

A>DDT SCAN.HEXDDT VER 1.0NEXT PC0121 0000-L116-116 JMP 0000 Check to ensure end is still at 116H0119 STAX B011A NOP011B INR B-(rubout)-G100,116 Go

Strany 42

5.1 IntroductionThis chapter describes CP/M (release 2) system organization including the structure of memoryand system entry points. This section pro

Strany 43

+---------------------------------+ High | | Memory | FDOS (BDOS + BIOS) | FBASE: |

Strany 44

Transient programs are loaded into the TPA and executed as follows. The operatorcommunicates with the CCP by typing command lines following each promp

Strany 45

5.2 Operating System Call ConventionsThis section provides detailed information for performing direct operating system calls from userprograms. Many o

Strany 46

1.3 Switching DisksThe operator can switch the currently logged disk by typing the disk drive name, A through P,followed by a colon when the CCP is wa

Strany 47

0 System Reset 19 Delete File 1 Console Input 20 Read Sequential 2 Console Output 21 Write S

Strany 48

Upon entry to a transient program, the CCP leaves the stack pointer set to an eight-level stackarea with the CCP return address pushed onto the stack,

Strany 49

Table 5-1. CP/M Filetypes Filetype Meaning ASM Assembler Source PRN Printer Listing HEX Hex Machine Code

Strany 50

Files in CP/M can be thought of as a sequence of up to 65536 records of 128 bytes each,numbered from 0 through 65535, thus allowing a maximum of 8 meg

Strany 51

The following table lists and describes each of the fields in the File Control Block figure. Table 5-2. File Control Block Fields Fi

Strany 52

Each file being accessed through CP/M must have a corresponding FCB, which provides thename and allocation information for all subsequent file operati

Strany 53

As an added convenience, the default buffer area at location BOOT+0080H is initialized to thecommand line tail typed by the operator following the pro

Strany 54

FUNCTION 1: CONSOLE INPUTEntry Parameters:RegisterC: 01HReturned Value:Register A: ASCII CharacterThe Console Input function reads the next console ch

Strany 55

FUNCTION 3: READER INPUTEntry Parameters:Register C: 03HReturned Value:Register A: ASCII CharacterThe Reader Input function reads the next character f

Strany 56

FUNCTION 5: LIST OUTPUTEntry Parameters:Register C: 05HRegister E: ASCII CharacterThe List Output function sends the ASCII character in register E to

Strany 57

1.4.1 ERA CommandSyntax:ERA afnThe ERA (erase) command removes files from the currently logged-in disk, for example, the diskname currently prompted b

Strany 58

FUNCTION 7: GET 1/0 BYTEEntry Parameters:Register C: 07HReturned Value:Register A: 1/0 Byte ValueThe Get I/O Byte function returns the current value o

Strany 59

Entry Parameters:Register C: OAHRegisters DE: Buffer AddressReturned Value:Console Characters in BufferThe Read Buffer function reads a line of edited

Strany 60

Table 5-3. (continued) Character Edit Control Function CTRL-M (return) terminates input line CTRL-R retypes the curre

Strany 61

FUNCTION 12: RETURN VERSION NUMBEREntry Parameters:Register C: 0CHReturned Value: Version NumberRegisters HL:Function 12 provides information that all

Strany 62

FUNCTION 14: SELECT DISKEntry Parameters:Register C: 0EHRegister E: Selected DiskThe Select Disk function designates the disk drive named in register

Strany 63

If a directory element is matched, the relevant directory information is copied into bytes d0through dn of FCB, thus allowing access to the files thro

Strany 64

FUNCTION 17: SEARCH FOR FIRSTEntry Parameters:RegisterC: 11HRegisters DE: FCB AddressReturned Value:Register A: Directory CodeSearch First scans th

Strany 65

FUNCTION 18: SEARCH FOR NEXTEntry Parameters:Register C: 12HReturned Value:Register A: Directory CodeThe Search Next function is similar to the Search

Strany 66

FUNCTION 20: READ SEQUENTIALEntry Parameters:Register C: 14HRegisters DE: FCB AddressReturned Value:Register A: Directory CodeGiven that the FCB addre

Strany 67

FUNCTION21: WRITE SEQUENTIALEntry Parameters:Register C: 15HRegisters DE: FCB AddressReturned Value:Register A: Directory CodeGiven that the FCB addr

Strany 68

1.4.2 DIR CommandSyntax:DIR afnThe DIR (directory) command causes the names of all files that satisfy the ambiguous filenameafn to be listed at the co

Strany 69

FUNCTION 22: MAKE FILEEntry Parameters:Register C: 16HRegisters DE: FCB AddressReturned Value:Register A: Directory CodeThe Make File operation is sim

Strany 70

FUNCTION 24: RETURN LOG-IN VECTOREntry Parameters:Register C: 18HReturned Value:Registers HL: Log-in VectorThe log-in vector value returned by CP/M is

Strany 71

FUNCTION 26: SET DMA ADDRESSEntry Parameters:Register C: 1AHRegisters DE: DMA AddressDMA is an acronym for Direct Memory Address, which is often used

Strany 72

FUNCTION 28: WRITE PROTECT DISKEntry Parameters:Register C: I CHThe Write Protect Disk function provides temporary write protection for the currently

Strany 73

FUNCTION 30: SET FILE ATTRIBUTESEntry Parameters:Register C: 1EHRegisters DE: FCB AddressReturned Value:Register A: Directory CodeThe Set File Attribu

Strany 74

FUNCTION 32: SET/GET USER CODEEntry Parameters:Register C: 20HRegister E: OFFH (get) orUser Code (set)Returned Value:Register A: Current Code or(no va

Strany 75

Thus, the r0, r1 byte pair is treated as a double-byte, or word value, that contains the record toread. This value ranges from 0 to 65535, providing a

Strany 76

FUNCTION 34: WRITE RANDOMEntry Parameters:Register C: 22HRegisters DE: FCB AddressReturned Value:Register A: Return CodeThe Write Random operation is

Strany 77

FUNCTION 35: COMPUTE FILE SIZEEntry Parameters:Register C: 23HRegisters DE: FCB AddressReturned Value:Random Record Field SetWhen computing the size o

Strany 78

FUNCTION 36: SET RANDOM RECORDEntry Parameters:Register C: 24HRegisters DE: FCB AddressReturned Value:Random Record Field SetThe Set Random Record fun

Strany 79

1.4.3 REN CommandSyntax:REN ufn1=ufn2The REN (rename) command allows you to change the names of files on disk. The file satisfyingufn2 is changed to u

Strany 80

FUNCTION 37: RESET DRIVEEntry Parameters:Register C: 25HRegisters DE: Drive VectorReturned Value:Register A: 00HThe Reset Drive function allows resett

Strany 81

5.3 A Sample File-to-File Copy ProgramThe following program provides a relatively simple example of file operations. The programsource file is create

Strany 82

0016 = makef equ 22; make file func# ; 0100 org tpa ; beginning of tpa 0100 311902 lxi sp,sta

Strany 83

0137 115C00 copy: lxi d,sfcb ; source 013A CD7801 call read ; read next record 013D B7 ora a

Strany 84

0178 0E14 read: mvi c,readf 017A C30500 jmp bdos ; 017D 0E15 write: mvi c,writef 017F C30500 jmp

Strany 85

5.4 A Sample File Dump UtilityThe following file dump program is slightly more complex than the simple copy program givenin the previous section. The

Strany 86

007C = FCBCR EQU FCB+32 ;CURRENT (NEXT) RECORD ;NUMBER (0 TO 127) 007D = FCBLN EQU FCB+33 ;FCB LENGTH ;

Strany 87

012D E60F ANI 0FH ;CHECK LOW 4 BITS 012F C24401 JNZ NONUM ; PRINT LINE NUMBER 0132 CD7201 CALL CRLF ;

Strany 88

015E CD0500 CALL BDOS 0161 C1D1E1 POP B! POP D! POP H; ENVIRONMENT RESTORED 0164 C9 RET ; PCHAR: ;PRINT

Strany 89

0197 F1 POP PSW 0198 CD7D01 CALL PNIB 019B C9 RET ; ERR: ;PRINT ERROR MESSAGE ; D,E

Strany 90

1.4.4 SAVE CommandSyntax:SAVE n ufnThe SAVE command places n pages (256-byte blocks) onto disk from the TPA and names thisfile ufn. In the CP/M distri

Strany 91

SETUP: ;SET UP FILE ; OPEN THE FILE FOR INPUT 01C1 AF XRA A ;ZERO TO ACCUM 01C2 327C00 STA FCBCR ;CLEAR CUR

Strany 92

5.5 A Sample Random Access ProgramThis section concludes with an extensive example of random access operation. The programlisted below performs the s

Strany 93

Sample Random Access Program for CP/M 2.0 0100 org 100h ; base of tpa ; 0000 = reboot equ

Strany 94

010D 111502 lxi d,badver 0110 CDD501 call print 0113 C30000 jmp reboot ;

Strany 95

014F 3C inr a ; err 255 becomes 0 0150 CAB401 jz error ; error message, retry 0153 C30000

Strany 96

; ; end of write command, process read ; notw: ; not a write c

Strany 97

getchr: ; read next console character to a 01BD 0E01 mvi c,coninp 01BF CD0500 call

Strany 98

01F4 1A readc: dax d ; next command character 01F5 13 inx d ; to next command position 01F6 B7

Strany 99

0254 6572726F72errmsg: db 'error, try again.$' 0266 6E65787420prompt: db 'next command? $' ;

Strany 100

Instead of reading a number, the QUERY program reads an alphanumeric string that is aparticular key to find in the N A M E S . D A T data base. Becau

Strany 101

The TYPE command expands tabs, CTRL-I characters, assuming tab positions are set at everyeighth column. The ufn can also reference a drive name.TYPE B

Strany 102

Function Function Input OutputNumber Name8 8 Set I/O Byte E = I/O byte none9 9 Print String DE = Buffer Address none10 A Read Console String DE = Buff

Strany 103

Function Function Input OutputNumber Name34 22 Write Random DE = FCB address A = error Code35 23 Compute File SIze DE = FCB address r0, r1, r236 24 Se

Strany 104

Section 6CP/M 2 Alteration6.1 IntroductionThe standard CP/M system assumes operation on an Intel MDS-800 microcomputer developmentsystem, but is desig

Strany 105

File expansion is achieved by providing up to 512 logical file extents, where each logical extentcontains 16K bytes of data. CP/M 2 is structured, ho

Strany 106

6.2 First-level System RegenerationThe procedure to patch the CP/M system is given below. Address references in each step areshown with H denoting the

Strany 107

3. Run the GETSYS program using an initialized CP/M disk to see if GETSYS loads CP/M starting at 3380H (the operating system actually starts 128 byt

Strany 108

11. Upon completion of step 10, CP/M has prompted the console for a command input. To test the disk write operation, typeSAVE 1 X.COMAll commands mus

Strany 109

18. Load and test the debugger by typingDDTSee Section 4 for operating procedures. 19. Before making further CBIOS modifications, practice using the

Strany 110

To get the memory image of CP/M into the TPA configured for the desired memorv size, typethe command:MOVCPM xx*where xx is the memory size in decimal

Strany 111

3400H + n = 980H, or n = 980H - 3400HAssuming two's complement arithmetic, n = D580H, which can be checked by 3400H+D580H = 10980H = 0980H (ignor

Strany 112

COPYRIGHTCopyright C 1976, 1977, 1978, 1979, 1982, and 1983 by Digital Research. All rights reserved.No part of this publication may be reproduced, t

Strany 113

CTRL-I Terminates current input (line-feed). CTRL-M Terminates current input (carriage return). CTRL-P Copies all subsequent console outp

Strany 114

If you want to locate the address x within the memory image loaded under DDT in a 20Ksystei-n, first typeHx,n Hexadecimal sum and

Strany 115

Examine the CBOOT withL900You are now ready to replace the CBIOS by examining the area at 1F80H, where the originalversion of the CBIOS resides, and t

Strany 116

The following program provides a framework for the GETSYS and PUTSYS programsreferenced in Sections 6.1 and 6.2. To read and write the specific sector

Strany 117

RDSEC: ; READ NEXT SECTOR CALL RDSEC ; USER SUPPLIED SUBROUTINE LXI D,128 ; MOVE LOAD ADDRESS TO NEX

Strany 118

The sector allocation for the standard distribution version of CP/M is given here for referencepurposes. The first sector contains an optional softwar

Strany 119

Table 6-3. CP/M Disk Sector Allocation Track Sector Page # Memory Address CP/M Module name 00 01 (boot address) Cold Start L

Strany 120

The entry points into the BIOS from the cold start loader and BDOS are detailed below. Entry tothe BIOS is through a jump vector located at 4A00H + b,

Strany 121

4A09H+b JMP CONIN ;READ CONSOLE CHARACTER IN4A0CH+b JMP CONOUT ;WRITE CONSOLE CHARACTER OUT4A0FH+b JMP LIST ;WRITE LISTING C

Strany 122

All simple character I/O operations are assumed to be performed in ASCII, upper- andlower-case, with high-order (parity bit) set to zero. An end-of-fi

Strany 123

The definition of the IOBYTE function corresponds to the Intel standard as follows: a singlelocation in memory, currently location 0003H, is maintaine

Strany 124

1.6 Transient CommandsTransient commands are loaded from the currently logged disk and executed in the TPA. Thetransient commands for execution under

Strany 125

Table 6-4. (continued) Value Meaning PUNCH field (bits 4,5) 0 PUNCH is the teletype device (TTY:) 1 PUNC

Strany 126

The READ and WRITE routines should perform several retries (10 is standard) before reportingthe error condition to the BDOS. If the error condition i

Strany 127

Table 6-5. (continued) Entry Point Function location 5,6,7 Set to JMP BDOS, which is the primary entry point to CP/M

Strany 128

Table 6-5. (continued) Entry Point Function HOME The disk head of the currently selected disk (initially disk A) is moved to the

Strany 129

Table 6-5. (continued) Entry Point Function SETSEC Register BC contains the sector number, 1 through 26, for subsequent disk acc

Strany 130

Table 6-5. (continued) Entry Point Function WRITE Data is written from the currently selected DMA address to the currently selec

Strany 131

6.7 A Sample BIOSThe program shown in Appendix B can serve as a basis for your first BIOS. The simplestfunctions are assumed in this BIOS, so that you

Strany 132

6.9 Reserved Locations in Page ZeroMain memory page zero, between locations 0H and 0FFH, contains several segments of code anddata that are used durin

Strany 133

Table 6-6. (continued) Locations Contents 0040H-004FH A 16-byte area reserved for scratch by CBIOS, but is not used for any purp

Strany 134

6.10 Disk Parameter TablesTables are included in the BIOS that describe the particular characteristics of the disk subsystemused with CP/M. These tabl

Strany 135

Transient commands are specified in the same manner as built-in commands, and additionalcommands are easily defined by the user. For convenience, the

Strany 136

Table 6-7. (continued) Disk Parameter Header Meaning DPB Address of a disk parameter block for this drive. Drives withide

Strany 137

A responsibility of the SELDSK subroutine is to return the base address of the DPH for theselected drive. The following sequence of operations returns

Strany 138

The following field abbreviations are used in Figure 6-4: -SPT is the total number of sectors per track. -BSH is the data allocation block shift

Strany 139

Table 6-9. EXM Values EXM values BLS DSM<256 DSM>255 1,024 0

Strany 140

Position 00 corresponds to the high-order bit of the byte labeled AL0 and 15 corresponds to thelow-order bit of the byte labeled AL1. Each bit positio

Strany 141

The size of the area addressed by CSV is CKS bytes, which is sufficient to hold the directorycheck information for this particular drive. If CKS = (DR

Strany 142

The remaining portion of the BIOS is defined following the DISKDEF macros, with the ENDEFmacro call immediately preceding the END statement. The ENDEF

Strany 143

The cks parameter determines the number of directory items to check on each directory scan andis used internally to detect changed disks during system

Strany 144

The DISKS macro generates n DPHS, starting at the DPH table address DPBASE generated bythe macro. Each disk header block contains sixteen bytes, as de

Strany 145

Following the ENDEF macro call, a number of uninitialized data areas are defined. These dataareas need not be a part of the BIOS that is loaded upon c

Strany 146

STAT afn The command line can also specify a set of files to be scanned by STAT. The files that satisfy afn are listed in alphabetical order, wit

Strany 147

Three examples of DISKDEF macro invocations are shown below with corresponding STATparameter values. The last example produces a full 8-megabyte syste

Strany 148

Appendix G lists the blocking and deblocking algorithms in skeletal form; this file is included onyour CP/M disk. Generally, the algorithms map all C

Strany 149

; MDS-800 I/O DRIVERS FOR CP/M 2.2 ; (FOUR DRIVE SINGLE DENSITY VERSION) ; ; VERSION 2.2

Strany 150

; REG-A = FF IF CHARACTER READY ; CONIN CONSOLE CHARACTER IN (RESULT IN REG-A) ; CONOUT CONSOLE CHARACTE

Strany 151

DISKS4 ;FOUR DISKS 1633+= DPBASE EQU $ ;BASE OF DISK PARAMETER BLOCKS 1633+82160000 DPE0: DW XLT0,0000H ;TRANSLATE TABLE 163

Strany 152

1690+08 DB 8 1691+0E DB 14 1692+14 DB 20 1693+1A DB 26 1694+06 DB 6 1695+0C DB 12 1696+12 DB

Strany 153

;(MONITOR) ; ; MDS MONITOR EQUATES F800 = MON80 EQU 0F800H ;MDS MONITOR FF0F = RMON80 EQU 0FF0FH ;RESTAR

Strany 154

16B6 219C16 LXI H,SIGNON 16B9 CDD317 CALL PRMSG ;PRINT MESSAGE 16BC AF XRA A ;CLEAR ACCUMULATOR 16BD 320400 STA CDISK ;SET INITIA

Strany 155

; MUST BE SECTOR 26, ZERO AND GO TO NEXT TRACK 16FC 3A6A18 LDA IOT ;GET TRACK TO REGISTER A 16FF 3C INR A 1700 4F

Strany 156

; PREVIOUSLY SELECTED DISK WAS B, SEND PARAMETER TO CPM 1741 3A0400 LDA CDISK ;LAST LOGGED DISK NUMBER 1744 4F MOV C,A ;SE

Strany 157

The actual devices attached to any particular computer system are driven by subroutines in theBIOS portion of CP/M. Thus, the logical RDR: device, for

Strany 158

; PUNCH: ;PUNCH DEVICE OUT ; (EXACTLY THE SAME AS MDS CALL) 1772 C30CF8 JMP PO ;

Strany 159

; SETTRK: ;SET TRACK ADDRESS GIVEN BY C 17A7 216A18 LXI H,IOT 17AA 71 MOV M,C 17AB C9 RET

Strany 160

17D5 C8 RZ ; MORE TO PRINT 17D6 E5 PUSH H 17D7 4F MOV C,A 17D8 CD6A17 CALL CONOUT 17DB E1 POP H 17D

Strany 161

180E D38A OUT IHIGH+10H ; 1810 CD5918 WAIT0: CALL INSTAT ;WAIT FOR COMPLETION 1813 E604 ANI IORDY ;READY? 1815 CA1018

Strany 162

; (ACCUMULATOR BITS ARE NUMBERED 7 6 5 4 3 2 1 0) ; ; IT MAY BE USEFUL TO FILTER OUT THE VARIOUS CONDITI

Strany 163

IOPB: ;IO PARAMETER BLOCK 1867 80 DB 80H ;NORMAL I/O OPERATION 1868 04 IOF: DB READF ;IO FUNCTION, INITIAL READ 1869 01

Strany 164

; skeletal cbios for first level of CP/M 2.0 alteration;msize equ 20 ;cp/m version memory size in kilobytes;; "bias" is address offset from

Strany 165

; disk parameter header for disk 01dw trans, 0000hdw 0000h, 0000hdw dirbf, dpblkdw chk01, all01; disk parameter header for disk 02dw trans, 0000hdw 00

Strany 166

;wboot: ;simplest case is to read the disk until all sectors loadedlxi sp, 80h ;use space below buffer for stackmvi c, 0 ;select disk 0call seldskcall

Strany 167

inr c ;track=track+1;; save register state, and change trackspush bpush dpush hcall settrk ;track address set from register cpop hpop dpop bjmp load1

Strany 168

It is emphasized that the physical device names might not actually correspond to devices that thenames imply. That is, you can implement the PTP: devi

Strany 169

;conout: ;console character output from register cmov a, c ;get to accumulatords 10h ;space for output routineret;list: ;list character from register

Strany 170

mov l, a ;l=disk number 0, 1, 2, 3mvi h, 0 ;high order zerodad h ;*2dad h ;*4dad h ;*8dad h ;*16 (size of each header)lxi d, dpbasedad 0 ;hl=,dpbase (

Strany 171

write: ;perform a write operationds 10h ;set up write command;waitio: ;enter here from read and write to perform the actual i/o; operation. return a 0

Strany 172

; COMBINED GETSYS AND PUTSYS PROGRAMS FROM ; SEC 6.4 ; ; START THE PROGRAMS AT THE BASE O

Strany 173

;ARRIVE HERE AT END OF LOAD, HALT FOR LACK OF ANYTHING ;BETTER 011F FB EI 0120

Strany 174

READ$SEC: ;READ THE NEXT SECTOR ;TRACK IN <B>, ;SECTOR IN <

Strany 175

title 'mds cold start loader at 3000h';; mds-800 cold start loader for cp/m 2.0;; version 2.0 august, 1979;false equ 0true equ not falsete

Strany 176

;rstart:lxi sp,stack; ;in case of call to mon80; clear disk statusin rtypein rbyte; check if boot switch is offcoldstart:in bswani 02h ;switch on?jnz

Strany 177

rar ;restoreani 11110b ;overrun/addr err/seek/crc/xxxx;if testingcnz rmon80 ;go to monitorendifif not testingjnz rstart ;retry the loadendif;;lxi d,io

Strany 178

;THIS IS A SAMPLE COLD START LOADER, WHICH, WHEN ;MODIFIED ;RESIDES ON TRACK 00, SECTOR 01 (THE FIRST S

Strany 179

The current logical-to-physical device assignment is changed by typing a STAT command of theform:STAT ld1=pd1,ld2=pd2,...,ldn=pdnwhere ld1 through ldn

Strany 180

;ADDRESS LSECT: ;LOAD THE NEXT SECTOR ; INSERT INLINE CODE AT THIS POINT TO

Strany 181

007A 0E01 MVI C,1 ;SECTOR = 1 007C 04 INR B ;TRACK = TRACK + 1 007D C30800 JMP LSECT ;FOR ANOTHER GROUP 0080

Strany 182

; CP/M 2.0 disk re-definition library;; Copyright (c) 1979; Digital Research; Box 579; Pacific Grove, CA; 93950;; CP/M logical disk drives are defined

Strany 183

; dsk set 0; rept 3; dsk set dsk+1; diskdef%dsk,0; endm; endef;; the value of "begdat" at the end of assembly defines the; beginning of the

Strany 184

ddw macro data,comment;; define a dw statementdw data commentendm;gcd macro m,n;; greatest common divisor of m,n;; produces value gcdn as result;; (us

Strany 185

exitmendif;; otherwise, high order 1 not found yetblkshf set blkshf+1blkmsk set (blkmsk shl 1) or 1blkval set blkval/2endm;; generate the extent mask

Strany 186

ddb %blkshf,<;block shift>ddb %blkmsk,<;block mask>ddb %extmsk,<;extnt mask>ddw %(dks)-1,<;disk size-1>ddw %(dir)-1,<;direc

Strany 187

endm;defds macro lab,spacelab: ds spaceendm;lds macro lb,dn,valdefds lb&dn,%val&dnendm;endef macro;; generate the necessary ram data areasbegd

Strany 188

;***************************************************** ;* *

Strany 189

; ;***************************************************** ;*

Strany 190

The Ext field counts the number of physical extents allocated to the file. The Ext countcorresponds to the number of directory entries given to the fi

Strany 191

; SETTRK: ;SET TRACK GIVEN BY REGISTERS BC 0023 60 MOV H,B 0024 69 MOV L,C 0025 226201

Strany 192

;* * ;* THE WRITE ENTRY POINT TAKES THE PLACE OF *

Strany 193

0090 217001 LXI H,UNASEC 0093 BE CMP M ;SEKSEC = UNASEC? 0094 C2AE00 JNZ ALLOC ;SKIP IF NOT ; ; MATCH,

Strany 194

00BF+B7 ORA A ;CARRY = 0 00C0+1F RAR ;SHIFT RIGHT 00C1 326901 STA SEKHST ;HOST SECTOR TO SEEK ; ; A

Strany 195

010B AF XRA A ;0 TO ACCUM 010C 326B01 STA HSTWRT ;NO PENDING WRITE ; MATCH: ;COPY DATA TO OR

Strany 196

0140 FE01 CPI WRDIR ;TO DIRECTORY? 0142 3A7101 LDA ERFLAG ;IN CASE OF ERRORS 0145 C0 RNZ ;NO FURTHER PROCESSING ;

Strany 197

; READHST: ;HSTDSK = HOST DISK #, HSTTRK = HOST TRACK #, ;HSTSEC = HOST SECT #. READ &q

Strany 198

Appendix HGlossaryaddress: Number representing the location of a byte in memory. Within CP/M there are twokinds of addresses: logical and physical. A

Strany 199

assembler: Program that translates assembly language into the binary machine code. Assemblylanguage is simply a set of mnemonics used to designate the

Strany 200

for the high-order bit. Bit values are often represented in hexadecimal notation by grouping thebits from the low-order bit in groups of four. Each g

Strany 201

When a file is marked R/O, subsequent attempts to erase orwrite into the file produce the following BDOS message at yourscreen:BDOS Err on d: File R/O

Strany 202

BTREE: General purpose file access method that has become the standard organization forindexes in large data base systems. BTREE provides near optimu

Strany 203

command: CP/M command line. In general, a CP/M command line has three parts: thecommand keyword, command tail, and a carriage return. To execute a com

Strany 204

control character: Nonprinting character combination. CP/M interprets some control charactersas simple commands such as line editing functions. To ent

Strany 205

default buffer: Default 128-byte buffer maintained at 0080H in page zero. When the CCP loadsa COM file, this buffer is initialized to the command tall

Strany 206

removable cartridge disk, or fixed hard disk. Hard disk capacities range from five to severalhundred megabytes of storage.diskdef macro library: Libr

Strany 207

DMA: Direct Memory Access. DMA is a method of transferring data from the disk into memorydirectly. In a CP/M system, the BDOS calls the BIOS entry poi

Strany 208

CP/M 1.4 compatiblity should be aware of the implications of this difference. See CP/M 1.4compatibility.extent mask (EXM): A byte parameter in the dis

Strany 209

hard disk: Rigid, platter-like, magnetic disk sealed in a container. A hard disk stores moreinformation than a floppy disk.hardware: Physical componen

Strany 210

BIOS and interpreted by the BIOS I/O entry points CONST, CONIN, CONOUT, LIST, PUNCH,and READER. Depending on the setting of the IOBYTE, different I/O

Strany 211

LST: Logical CP/M list device, usually a printer. The CP/M list device is an output-only devicereferenced through the LIST and LISTST entry points of

Strany 212

For logical drives that share the same physical disk, the number of reserved tracks can be quitelarge because this mechanism is used to skip lower-num

Strany 213

environment between the computer and its peripheral devices. It enables user-written programs toexecute safely. An operating system standardizes the

Strany 214

prompt: Any characters displayed on the video screen to help the user decide what the nextappropriate action is. A system prompt is a special prompt d

Strany 215

restart (RST): One-byte call instruction usually used during interrupt sequences and fordebugger break pointing. There are eight restart locations, RS

Strany 216

per block is given by BLS/128. Physical sectors on the disk media are also numberedconsecutively. If the physical sector size is also 128 bytes, a one

Strany 217

SYSGEN image: Memory image of the CP/M system created by SYSGEN when a destinationdrive is not specified. This is the same as the MOVCPM image that ca

Strany 218

user number: Number assigned to files in the disk directory so that different users need onlydeal with their own files and have their own directories,

Strany 219

Appendix ICP/M Error MessagesMessages come from several different sources. CP/M displays error messages when there areerrors in calls to the Basic Di

Strany 220

Table 1-1. (continued)Message MeaningN Not implemented: unimplemented features, such as macros,are trapped.0 Overflow: expression is too complex to ev

Strany 221

Table 1-1. (continued)Message MeaningBdos Err On d: Bad SectorThis message appears when CP/M finds no disk in the drive, when the disk isimpro

Strany 222

Table I-1. (continued)Message Meaning- The file specified in an R command cannot be found.> Buffer full. ED cannot put any more characters

Strany 223

Table of Contents1 CP/M Features and Facilities1.1 Introduction 1-11.2 Functional . . Description ...

Strany 224

The assembler produces a file:X.PRNwhere X is the primary name specified in the ASM command. The PRN file contains a listing ofthe source program

Strany 225

Table 1-1. (continued)Message MeaningCANNOT READPIP. PIP cannot read the specified source. Reader cannot be implemented.CANNOT WRITEPIP. The

Strany 226

Table 1-1. (continued)Message MeaningDESTINATION IS R/O, DELETE (Y/N)?PIP. The destination file specified in a PIP command already exists and

Strany 227

Table 1-1. (continued)Message MeaningDISK WRITE ERROR--{filespec}DDT. A disk write operation cannot be successfully performed during a Wcomma

Strany 228

Table 1-1. (continued)Message MeaningERROR: DISK WRITE, LOAD ADDRESS hhhhLOAD. Destination disk is full.ERROR: INVERTED LOAD ADDRESS, LOAD AD

Strany 229

Table 1-1. (continued)Message MeaningFile exists, erase itED. The destination filename already exists when you are placing the destinationfi

Strany 230

Table 1-1. (continued)Message MeaningInsufficient memoryDDT. There is not enough memory to load the file specified in an R or Ecommand.Invalid Assign

Strany 231

Table 1-1. (continued)Message MeaningINVALID DRIVE NAME (Use A, B, C, or D)SYSGEN. SYSGEN recognizes only drives A, 5, C, and D as valid destinations

Strany 232

Table 1-1. (continued)Message Meaningn ? USER. You specified a number greater than fifteen for a user area number. Forexample, if you type USER 18

Strany 233

Table 1-1. (continued)Message MeaningNO SOURCE FILE ON DISKSYSGEN. SYSGEN cannot find CP/M either in C P / M x x . C 0 M form or onthe system tracks

Strany 234

Table I-1. (continued)Message MeaningOUTPUT FILE WRITE ERRORASM. You specified a write-protected disk as the destination for the PRN andHEX f

Strany 235

1.6.3 LOAD CommandSyntax:LOAD ufnThe LOAD command reads the file ufn, which is assumed to contain HEX format machine code,and produces a memory image

Strany 236

Table 1-1. (continued)Message MeaningRequires CP/M 2.0 or new for operationPIP. This version of PIP requires the facilities of CP/M 2.0 or ne

Strany 237

Table 1-1. (continued)Message Meaning** TOO MANY' FILES **STAT. There is not enough memory for STAT to sort the files specified, or more

Strany 238

Table 1-1. (continued)Message MeaningYour Input?If CP/M cannot find the command you specified, it returns the command nameyou entered followed by

Strany 239

ACAbsolute line number, 2-5 Case translation, 1-6, 1-7, 1-31, 1-32 1-33,2-7, 2-10, 2-20, Access mode, 1-19 2-21, 2-22, 3-7, 5-10, 5-11afn (ambiguous f

Strany 240

D Drive characteristics, 1-21Drive select code, 5-9Data allocation size, 6-31 Drive specification, 1-7Data block number, 6-32 DS statement, 3-16DB sta

Strany 241

File reference, 1-4 KFile statistics, 1-15, 1-19Filetvpe, 5-6 Key fields, 5-34Find command, 2-11fsc parameter, 6-35G Label field, 3-3Labels, 3-3, 3-4,

Strany 242

NNegative bias, 6-7 Radix indicators, 3-5Random access, 5-31, 5-32, 5-46Random record number, 5-32O READ, 6-23Read Console Buffer function, 5-16[o] pa

Strany 243

SECTRAN, 6-2 Translate table, 6-37SELDSK, 6-19, 6-22, 6-30 Translation vectors, 6-30Select Disk function, 5-19 TYPE, 1-11Sequential access, 5-8 Set

Strany 244

Note: the BETA.HEX file must contain valid Intel format hexadecimal machine code records(as produced by the ASM program, for example) that begin at 10

Strany 245

When multiple files are given in the command line (for example, n>1), the individual files areassumed to contain ASCII characters, with an assumed

Strany 246

For convenience, PIP allows abbreviated commands for transferring files between disk drives.The abbreviated PIP forms arePIP d:=afnPIP d1:=d2:afnPIP u

Strany 247

PIP allows reference to physical and logical devices that are attached to the CP/M svstem. Thedevice names are the same as given under the STAT comman

Strany 248

-OUT: is a special PIP output destination that can be patched into the PIP program. PIP CALLs location 106H with data in register C for each cha

Strany 249

The following are valid PIP commands:PIP LST:=X.PRNCopies X.PRN to the LST device and terminates the PIP program.PIPStarts PIP for a sequence of comma

Strany 250

Table 1-4. PIP ParametersParameter Meaning B Blocks mode transfer. Data are buffered by PIP until an ASCII x-off

Strany 251

O Transfers non-ASCII object files. The normal CP/M end-of-file is ignored. Pn Includes page ejects at every n lines with an initial page eject.

Strany 252

Table of Contents (continued)2.1.7 Text Search and Alteration ... 2-112.1.8 Source Libraries ... 2-152.1.9 Repetitive Command E

Strany 253

The following examples show valid PIP commands that specify parameters in the file transfer.PIP X.ASM=B:[V]Copies X.ASM from drive B to the current dr

Strany 254

The file transfer is skipped, and PIP continues with the next operation in sequence. To avoid theprompt and response in the case of R/O file overwrite

Strany 255

1.6.5 ED Command Syntax:ED ufnThe ED program is the CP/M system context editor that allows creation and alteration of ASCIIfiles in the CP/M environme

Strany 256

DIR X.*Checks to see that BAK file is available. ERA X.ASMErases most recent version. REN X.ASM=X.BAKRenames the BAK file to ASM.You can

Strany 257

Similar to other transient commands, editing can take place on a drive different from thecurrently logged disk by preceding the source filename by a d

Strany 258

FUNCTION COMPLETESystem is copied to memory. SYSGEN then prompts with the following:DESTINATION DRIVE NAME(OR RETURN TO REBOOT)If a disk is being init

Strany 259

1.6.7 SUBMIT CommandSyntax:SUBMIT ufn parm#l ... parm#nThe SUBMIT command allows CP/M commands to be batched for automatic processing. Theufn given in

Strany 260

The last command in a SUB file can initiate another SUB file, allowing chained batchcommands.Suppose the file ASMBL.SUB exists on disk and contains th

Strany 261

An additional utility program called XSUB extends the power of the SUBMIT facility to includeline input to programs as well as the CCP. The XSUB comma

Strany 262

1.6.9 MOVCPM CommandSyntax:MOVCPMThe MOVCPM program allows you to reconfigure the CP/M system for any particular memorysize. Two optional parameters c

Strany 263

Table of Contents (continued)4 CP/M Dynamic Debugging Tool4.1 Introduction 4-14.2 DDT Commands 4-44.2.1 T

Strany 264

For example, the command,MOVCPM * *constructs a new version of the CP/M system and leaves it in memory, ready for a SYSGENoperation. The messageREADY

Strany 265

You can then go through the reboot process with the old or new disk. Instead of performing theSYSGEN operation, you can type a command of the form:SAV

Strany 266

The BAD SECTOR message indicates that the disk controller electronics has detected an errorcondition in reading or writing the disk. This condition is

Strany 267

1.8 Operation of CP/M on the MDSThis section gives operating procedures for using CP/M on the Intel MDS microcomputerdevelopment system. Basic knowled

Strany 268

You should use IBM-compatible disks rather than disks that have previously been used with anyISIS version. In particular, the ISIS FORMAT operation pr

Strany 269

Section 2The CP/M Editor2.1 Introduction to ED ED is the context editor for CP/M, and is used to create and alter CP/M source files. To start ED,type

Strany 270

Figure 2-1. Overall ED OperationThe memory buffer is logically between the source file and working file, as shown in Figure 2-2.2-2

Strany 271

Figure 2-2. Memory Buffer Organization2.1.2 Text Transfer FunctionsGiven that n is an integer value in the range 0 through 65535, several single-lett

Strany 272

E Ends the edit. Copy all buffered text to temporary file and copy all unprocessed source lines to temporary file. Rename files. H Moves to h

Strany 273

The memory buffer appears logically as shown in Figure 2-3, where the dashes representcharacters of the source line of indefinite length, terminated b

Strany 274

Table of Contents (continued)6.9 Reserved Locations in Page Zero ...6-266.10 Disk Parameter Tables ...

Strany 275

You can reference an absolute line number by preceding any command by a number followed bya colon, in the same format as the line number display. In t

Strany 276

2.1.5 Memory Buffer OperationWhen ED begins, the memory buffer is empty. You can either append lines from the source filewith the A command, or enter

Strany 277

Table 2-2. Editing Commands Command Action +-B Move CP to beginning of memory buffer if + and to bottom if +-nC Mo

Strany 278

Table 2-3. Line-editing Controls Command Result CTRL-C Reboots the CP/M system when typed at the start of a line.

Strany 279

Suppose the memory buffer contains the characters shown in the previous section, with the CPfollowing the last character of the buffer. In the followi

Strany 280

-2L#T<cr> Move up two lines and type 65535 lines ahead of CP NOW IS THE. The result in the memory buffer isNOW IS THE<cr><lf>^T

Strany 281

The following commands illustrate the use of the F command: Command String Effect B#T<cr> Move to the beginning and type the entire

Strany 282

Command String Effect BITHIS IS ^Z<cr> Insert THIS IS at the beginning of the text. The result in the memory buffer isTHIS IS

Strany 283

ED also provides a single command that combines the F and I commands to perform simplestring substitutions. The command takes the following form:nSs1^

Strany 284

A final line editing function, called the Juxtaposition comniand, takes the formnJs1^Zs2^Zs3<cr>ornJs1^Zs2^Zs3^Zwith the following action applie

Strany 285

Table of Contents (continued)3-7 Data Movement Instructions ...3-211-1 Arithmetic Logic Unit Operations ...

Strany 286

where filename is the primary filename of a source file on the disk with an assumed filetype ofLIB. ED reads the specified file, and places the charac

Strany 287

2.1.9 Repetitive Command ExecutionThe macro command M allows you to group ED commands together for repeated evaluation. TheM command takes the followi

Strany 288

2.2 ED Error ConditionsOn error conditions, ED prints the message BREAK X AT C where X is one of the errorindicators shown in Table 2-4.

Strany 289

ED also takes file attributes into account. If you attempt to edit a Read-Only file, the message** FILE IS READ/ONLY **appears at the console. The fil

Strany 290

Table 2-6 summarizes the commands used in ED. Table 2-6. ED Commands Command Function nA Append lines +-B Begi

Strany 291

Command Function nS Substitute strings +-nT Type lines U Translate lower- to upper-case if U, no translation if -U V Verif

Strany 292

The commands I, J, M, N, R, and S should be typed as i, j, m, n, r, and s if both upper- andlower-case characters are used in the operation, otherwise

Strany 293

Section 3CP/M Assembler3.1 IntroductionThe CP/M assembler reads assembly-language source files from the disk and produces 8080machine language in Inte

Strany 294

The form ASM filename parms is used to redirect input and output files from their defaults. Inthis case, the parms portion of the command is a three-l

Strany 295

The commandASM X.ABXindicates that the source file is to be taken from disk A, the hex file is to be placed on disk B, andthe listing file is to be se

Strany 296

Section 1CP/M Features and Facilities1.1 IntroductionCP/M is a monitor control program for microcomputer system development that uses floppydisks or W

Strany 297

x xy long$name x: yxl: longer$naned$data: X1Y2 X1x2 x234$5678$9012$3456:The operation field contains either a

Strany 298

3.3.1 LabelsA label is an identifier that occurs on a particular statement. In general, the label is given a valuedetermined by the type of statement

Strany 299

Similar to identifiers, embedded $ signs are allowed within constants to improve theirreadability. Finally, the radix indicator is translated to upper

Strany 300

3.3.4 String ConstantsString constants represent sequences of ASCII characters and are represented by enclosing thecharacters within apostrophe symbol

Strany 301

Table 3-2. Arithmetic and Logical Operators (continued) a * b unsigned magnitude multiplication of a and b a / bunsigned magnitude division of

Strany 302

3.3.6 Precedence of OperatorsAs a convenience to the programmer, ASM assumes that operators have a relative precedence ofapplication that allows the p

Strany 303

An unparenthesized expression is well-formed only if the expression that results from insertingthe assumed parentheses is well-formed.3.4 Assembler Di

Strany 304

3.4.1 The ORG DirectiveThe ORG statement takes the form:label ORG expressionwhere label is an optional program identifier and expression is a 16-bit e

Strany 305

3.4.3 The EQU DirectiveThe EQU (equate) statement is used to set up synonyms for particular numeric values. The EQUstatement takes the form:label EQU

Strany 306

3.4.4 The SET DirectiveThe SET statement is similar to the EQU, taking the form:label SET expressionexcept that the label can occur on other SET state

Strany 307

CP/M also supports ED, a powerful context editor, ASM, an Intel-compatible assembler, andDDT, debugger subsystems. Optional software includes a power

Strany 308

When encountering the IF statement, the assembler evaluates the expression following the IF. Alloperands in the expression must be defined ahead of th

Strany 309

3.4.6 The DB DirectiveThe DB directive allows the programmer to define initialized storage areas in singleprecisionbyte format. The DB statement takes

Strany 310

3.4.8 The DS DirectiveThe DS statement is used to reserve an area of uninitialized memory, and takes the form:label DS expressionwhere the label is op

Strany 311

3.5.1 Jumps, Calls, and ReturnsThe Jump, Call, and Return instructions allow several different forms that test the condition flagsset in the 8080 micr

Strany 312

Table 3-4. Jumps, Calls, and Returns (continued) Bit Form Value Example Meaning CPE e16 CPE $4 Call subroutine if par

Strany 313

3.5.2 Immediate Operand InstructionsSeveral instructions are available that load single- or double-precision registers orsingle-precision memory cells

Strany 314

3.5.3 Increment and Decrement InstructionsThe 8080 provides instructions for incrementing or decrementing single- and double precisionregisters. The i

Strany 315

3.5.4 Data Movement InstructionsInstructions that move data from memory to the CPU and from CPU to memory are given in thefollowing table.Table 3-7.

Strany 316

Table 3-7. (continued) Form with Bit Value Example Meaning IN e8 IN 0 Load register A with data from port e8. O

Strany 317

Table 3-8. (continued) Form with Bit Value Example Meaning ANA e3 ANA 1+1 Logical and reg with A, e3 as above. XRA e

Komentáře k této Příručce

Žádné komentáře