markdown 矿石/ rescii

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 矿石/ rescii相关的知识,希望对你有一定的参考价值。

# RESCII
Redstone Standard Code for Information Exchange

## Table of characters
### Shift In
| SI   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|L0  |L1  |L2  |L3  |
|**01**|L4  |L5  |L6  |L7  |
|**10**|L8  |L9  |L10 |L11 |
|**11**|L12 |L13 |L14 |L15 |

### Control I
| L0   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|NUL |BEL |SI  |SO  |
|**01**|STM |STX |ETX |ETM |
|**10**|EOL |BAS |TAB |SP  |
|**11**|ENQ |ACK |NCK |CEN |
NUL - Empty
BEL - Bell, Sound trigger, alert
STM - Start of transmission
STX - Start of text
ETX - End of text
ETM - End of transmission
EOL - End of Line
BAS - Backspace
TAB - Horizontal Tabulation
SP - Space
ENQ - Enquiry
ACK - Acknowledged
NCK - Not acknowledged
CEN - Cancel Enquiry

### Control II
| L1   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|ESC |BEL |SI  |SO  |
|**01**|LF  |CR  |DLE |DEL |
|**10**|FF  |EM  |SUB |CAN |
|**11**|CL  |REF |TON |TOF |
ESC - Escape
BEL - Bell, Sound trigger, alert
LF - Line Feed
CR - Carriage Return
DLE - Data link escape (Escapes 4 bytes)
DEL - Supr key
FF - Form Feed (New page)
EM - End of medium (No screen/memory left)
SUB - Substitute, request an identical response due to malformation
CAN - Cancel the data stream
CL - Clear
REF - ??
TON - ?? On
TOF - ?? Off

### Latin I
| L2   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|A   |B   |SI  |SO  |
|**01**|C   |D   |E   |F   |
|**10**|G   |H   |I   |J   |
|**11**|K   |L   |M   |SP  |

### Latin II
| L3   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|N   |O   |SI  |SO  |
|**01**|P   |Q   |R   |S   |
|**10**|T   |U   |V   |W   |
|**11**|X   |Y   |Z   |SP  |

### Latin III
| L4   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|0   |1   |SI  |SO  |
|**01**|2   |3   |4   |5   |
|**10**|6   |7   |8   |9   |
|**11**|0   |&   |!   |?   |

### Latin IV
| L5   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|a   |b   |SI  |SO  |
|**01**|c   |d   |e   |f   |
|**10**|g   |h   |i   |j   |
|**11**|k   |l   |m   |SP  |

### Latin V
| L6   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|n   |o   |SI  |SO  |
|**01**|p   |q   |r   |s   |
|**10**|t   |u   |v   |w   |
|**11**|x   |y   |z   |SP  |

### Extended I
| L7   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|\|  |@   |SI  |SO  |
|**01**|#   |$   |~   |%   |
|**10**|?   |!   |/   |\   |
|**11**|=   |+   |-   |*   |

### Extended II
| L8   | 00 | 01 | 10 | 11 |
|-----:|:--:|:--:|:--:|:--:|
|**00**|{   |}   |SI  |SO  |
|**01**|<   |>   |[   |]   |
|**10**|(   |)   |:   |;   |
|**11**|.   |,   |_   |^   |

## Size of character
The character size is always 4 bit, and you can store two characters in a byte. It is possible to use 224 characters ( removing `SI` and `SO`)
### `SI` and `SO`
To move around character tables, on different levels, there are the Shift In `SI` and Shift Out `SO` control characters, that must be on every character table.
One of the inconveniences of RESCII is that control codes such as `EOL`, `SI L0`, `BEL` or `EM` require more than one operation, so it might become slow. It's recommended that you use a separate RESCII processing unit, that is able to asynchronously change tables and pass back information to the CPU, and even perform tasks such as sending an `ENQ`.
#### Shift In `SI`
the RESCII Processing Unit should use the next 4 bits after a `SI` code to jump to another Character Table, 
`BEL SI L5 BEL*`
\*This will trigger a completely different signal, to be exact, the character `b`.
#### Shift Out `SO`
Perhaps the most useful character table function, as it switches between the current number and the one below.
If you needed to put a lot of lowercase characters, you could, at the cost of more space and time, Shift In and change table, or you could go to `L6` and use `SO`
Let's write `this is text`:
Using `SI`: 
```
SI L6 t SI L5 h i SI L6 s SI L0 SP SI L5 i SI L6 s SI L0 SP SI L6 t SI L5 e SI L6 x t
```
Using `SO`:
```
SI L6 t SO h i SO s SP SO i SO s SP t SO e SO x t
```

## RESCII Processing Unit
### Main parts
- Stream input
- Stream output
- Control output
### Stream input
Stream input should be parsed according to the character table in use, character tables are hardcoded in the RPU, and a 4-bit register keeps track of the table. `SI` and `SO` codes are for internal use of the RPU, and a control output with an `OK` signal is enough.
### Stream output
A stream output of 8 bits (for the 244 possible characters) that the CPU should be able to handle internally, since RESCII is just the encoding, not the way the CPU works with data.
### Control output
Control output should be able to send interrupts, and possibly directly communicate with the network manager, for the network control codes.


以上是关于markdown 矿石/ rescii的主要内容,如果未能解决你的问题,请参考以下文章

[BeiJing2011]元素

2460: [BeiJing2011]元素

BZOJ 2460 元素(线性基)

Bzoj 2460: [BeiJing2011]元素

[bzoj2460] [BeiJing2011] 元素

钢铁矿石专题研究报告(合集)