SC61860 is a certain model number of implementation of the CPU architecture ESR-H. It is also known as "old-SC" because there is another well-known "SC" cpu, SC62015 or "new-SC" whose architecture is ESR-L. ( I wonder why newer one is named as "L" rather than "H" ! )
ESR-H architecture cpu was widely used for SHARP's pocket computers ( PC-12xx, 13xx and 14xx ) and electronic organizers ( PA-6/7/8000, S1, T1, X1/2/3 and so on ) mostly in '80s or early '90s.
| symbol | int.RAM addr | usage | |
|---|---|---|---|
| P,Q | -- | 7bit internal RAM pointer | |
| R | -- | 7bit internal RAM pointer(stack) | |
| PC | -- | 16bit ext. storage pointer(program counter) | |
| DP | -- | 16bit ext. storage pointer | |
| I | 0x00 | counter | |
| J | 0x01 | ||
| K,L,M,N | 0x08,...,0x0b | ||
| A | 0x02 | accumulator | |
| B | 0x03 | accumulator (alt.) | |
| XL | 0x04 | 16bit pointer | |
| XH | 0x05 | ||
| YL | 0x06 | 16bit pointer | |
| YH | 0x07 | ||
| IA | 0x5c | I/O port A | |
| IB | 0x5d | I/O port B | |
| FO | 0x5e | I/O port F | |
| OUTC | 0x5f | control port (|-|Bz3|Bz2|Bz1|PowOFF|HLT|CntCLR|DispSW|) | 
| mnemonic | function | flag | byte | cycle | op code | note | 
|---|---|---|---|---|---|---|
| A | ||||||
| adb | (P+1,P):=(P+1,P)+BA; P++ | C,Z | 1 | 5 | 0x14 | |
| adcm | (P):=(P)+A+C | C,Z | 1 | 3 | 0xc4 | |
| adia n | A:=A+n | C,Z | 2 | 4 | 0x74, n | |
| adim n | (P):=(P)+n | C,Z | 2 | 4 | 0x70, n | |
| adm | (P):=(P)+A | C,Z | 1 | 3 | 0x44 | |
| adn | tmp:=I;{ (P):=(P)+A, P-- }wihle(tmp--) | C,Z | 1 | 4+3I | 0x0c | block BCD operation | 
| adw | tmp:=I;{ (P):=(P)+(Q), P--, Q-- }wihle(tmp--) | C,Z | 1 | 4+3I | 0x0e | block BCD operation | 
| adia n | A:=A&n | Z | 2 | 4 | 0x64, n | |
| anid n | [DP]:=[DP]&n | Z | 2 | 6 | 0xd4, n | consumes a byte of stack | 
| anim n | (P):=(P)&n | Z | 2 | 4 | 0x60, n | |
| anma | (P):=(P)&A | Z | 1 | 3 | 0x46 | |
| B | ||||||
| C | ||||||
| cal hl | push PC; PC=hl | - | 2 | 7 | 0xe0+h, l | hl is smaller than 0x2000 | 
| call hl | push PC; PC=hl | - | 3 | 8 | 0x78, h, l | |
| case1 n hl | k:=n; push hl | -- | 4 | 8 | 0x7a,n,h,l | switch() ? | 
| case2 n[1] hl[1] .. n[k] hl[k] hl0 | if (n[x]=A) {PC=hl[x]} else {PC=hl0} | ? | 3k+3 | 5k+7 | 0x69, n[1],h[1],l[1], ... ,n[k],h[k],l[k], h0,l0 | case: .. default: ? | 
| cdn | tmp:=I;Z=1;{if(!Xin){Z=0;break;}}while(tmp--) | Z | 1 | 4(I-tmp)+1 ? | 0x6f | for CMT use ? | 
| clra | A:=0 | - | 1 | 0x23 | undocumented instruction | |
| cpia | A-n > /dev/null | Z,C | 2 | 4 | 0x67, n | |
| cpim | (P)-n >/dev/null | Z,C | 2 | 4 | 0x63, n | |
| cpma | (P)-A >/dev/null | Z,C | 1 | 3 | 0xc7 | |
| cup | tmp:=I;Z:=1;{if(Xin){Z:=0;break;}}while(tmp--) | Z | 1 | 4(I-tmp)+1 ? | 0x4f | complemental of CDN | 
| D | ||||||
| deca | A--; Q:=0x02 | Z,C | 1 | 4 | 0x43 | |
| decb | B--; Q:=0x03 | Z,C | 1 | 4 | 0xc3 | |
| deci | I--; Q:=0x00 | Z,C | 1 | 4 | 0x41 | |
| decj | J--; Q:=0x01 | Z,C | 1 | 4 | 0xc1 | |
| deck | K--; Q:=0x08 | Z,C | 1 | 4 | 0x49 | |
| decl | L--; Q:=0x09 | Z,C | 1 | 4 | 0xc9 | |
| decm | M--; Q:=0x0a | Z,C | 1 | 4 | 0x4b | |
| decn | N--; Q:=0x0b | Z,C | 1 | 4 | 0xcb | |
| decp | P-- | - | 1 | 2 | 0x51 | |
| dx | X--; DP:=X; Q=0x05; | - | 1 | 6 | 0x05 | |
| dxl | X--; DP:=X; A=[DP]; Q=0x05; | - | 1 | 7 | 0x25 | |
| dy | Y--; DP:=Y; Q=0x07; | - | 1 | 6 | 0x07 | |
| dys | Y--; DP:=Y; [DP]:=A; Q=0x07; | - | 1 | 7 | 0x27 | |
| E | ||||||
| exab | A <-> B | - | 1 | 3 | 0xda | |
| exam | A <-> (P) | - | 1 | 3 | 0xdb | |
| exb | tmp:=J; do{(P++)<->(Q++)}while(tmp--) | - | 1 | 3+3(J+1) | 0x0b | |
| exbd | tmp:=J; do{(P++)<->[DP++]}while(tmp--) | - | 1 | 3+6(J+1) | 0x1b | |
| exw | tmp:=I; do{(P++)<->(Q++)}while(tmp--) | - | 1 | 3+3(I+1) | ||
| exwd | tmp:=I; do{(P++)<->[DP++]}while(tmp--) | - | 1 | 3+6(I+1) | ||
| F | ||||||
| fild | - | 1 | 4+3(I+1) | |||
| film | - | 1 | 4+(I+1) | |||
| G | ||||||
| H | ||||||
| I | ||||||
| ina | Z | 1 | ||||
| inb | Z | 1 | ||||
| inca | Z,C | 1 | ||||
| incb | Z,C | 1 | ||||
| inci | Z,C | 1 | ||||
| incj | Z,C | 1 | ||||
| inck | Z,C | 1 | ||||
| incl | Z,C | 1 | ||||
| incm | Z,C | 1 | ||||
| incn | Z,C | 1 | ||||
| incp | - | 1 | ||||
| ix | X++; DP:=X; Q:=0x05; | - | 1 | 0x04 | ||
| ixl | X++; DP:=X; Q:=0x05; A:=[DP]; | - | 1 | 0x24 | ||
| iy | Y++; DP:=Y; Q:=0x07; | - | 1 | 0x06 | ||
| iys | Y++; DP:=Y; Q:=0x07; [DP]:=A; | - | 1 | 0x26 | ||
| J | ||||||
       Memory Map of PC-1245/50/51/55
  
       Memory Map of PC-126x
  
       Memory Map of PC-1350
  
       Memory Map of PC-1401
  
       Memory Map of PC-1450