JPS6145341A - Memory editing and transfer method - Google Patents

Memory editing and transfer method

Info

Publication number
JPS6145341A
JPS6145341A JP16651884A JP16651884A JPS6145341A JP S6145341 A JPS6145341 A JP S6145341A JP 16651884 A JP16651884 A JP 16651884A JP 16651884 A JP16651884 A JP 16651884A JP S6145341 A JPS6145341 A JP S6145341A
Authority
JP
Japan
Prior art keywords
data
counter
input data
block
bits
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP16651884A
Other languages
Japanese (ja)
Inventor
Isao Tozawa
戸沢 勲
Akio Muramatsu
村松 昭男
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP16651884A priority Critical patent/JPS6145341A/en
Publication of JPS6145341A publication Critical patent/JPS6145341A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To transfer the input data every bit in a simple way by dividing the data every prescribed number of bits and dividing the data by the prescribed value to set a counter and shifting the AND output between the input data and a constant by an amount equivalent to the value set to the counter. CONSTITUTION:When an operation is started at a block 10, the initial values of a counter, a constant and the increment value are set at a block 11 as shown in a figure (a). Then the input data are extracted at a block 12 as shown in a figure (b), and an AND is secured at a block 13 with the constant. The input data is shifted at a block 14 by an amount equivalent to the increment value of the counter. In this case, however, no shift is given to the first input data. Then the result of the block 14 is OR-written to the output data at a block 15. The counter, an output address and an input address are replaced at blocks 16, 17 and 18 respectively. The processes are repeated between blocks 12 and 19 until the data fetching is through.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はメモリの編集転送方法に関し、ある形式の入力
データをビット単位に切って転送する場合のメモリの編
集方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a memory editing and transferring method, and more particularly, to a memory editing method when input data of a certain format is cut into bits and transferred.

本発明は入力データが例えば32ビット(4バイト)の
メモリ領域に左づめで蓄積されている場合これを例えば
19ビット単位で切断して転送するような場合に利用さ
れる。
The present invention is used when, for example, input data is stored left-justified in a 32-bit (4-byte) memory area and is to be cut and transferred in units of, for example, 19 bits.

〔従来の技術〕[Conventional technology]

ある形式の入力データをビット単位に区切って転送する
場合に入力データが第3図(a)のごとき形式である場
合について述べる。@3図において入力データは32ビ
ット(4バイト)の中に左づめでデータが入っておシこ
の場合実際に有効なデータはnビット(1≦n≦32)
であるとする。この入力データを転送する場合有効なデ
ータはnビットの■、■、■、・・・■であるからこれ
らの転送出力は第3図0)のごとき形式となる。この場
合有効なデータ以外を含んだ入力データを送っていたの
では、そのメモリ領域が余分に必要となるので不経済で
ある。
A case will be described in which input data in a certain format is divided into bits and transferred, and the input data is in the format shown in FIG. 3(a). @3 In figure 3, the input data is left-justified in 32 bits (4 bytes).In this case, the actual valid data is n bits (1≦n≦32).
Suppose that When this input data is transferred, the valid data is n-bits ■, ■, ■, . In this case, sending input data containing other than valid data would be uneconomical since an extra memory area would be required.

そこでこれらのデータを19ビット単位に切って転送す
ることが行なわれているが、このパターン(例えば32
ビット)をビット単位(例えば19ピツト)に切って転
送する場合ビットの単位が変わるとプログラムを作シ直
さなければならなかった。
Therefore, these data are cut into 19-bit units and transferred, but this pattern (for example, 32 bits) is
If the bit unit (for example, 19 bits) was to be cut and transferred, the program had to be rewritten if the bit unit changed.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

本発明はか\る従来技術の問題点にかんがみ、極めて単
純な方法である形式の入力データをビット単位に切って
転送する場合の手段を提供する。
In view of the problems of the prior art, the present invention provides means for cutting input data of a certain format into bits and transmitting the data in an extremely simple manner.

〔問題点を解決するための手段および作用〕本発明は上
記問題点を解消したメモリの編集転送方法を提供するも
ので、その手段は左づめでストアされたNx8ピツ)(
Nバイト)の入力データをmビット単位に切つて転送す
るメモリの編集方法において、前記mビットを8にて除
した商をカウンタに設定し且つ前記NX8ビットの領域
に対し前記mビットの定数を設定し、ついで(イ)入力
データNX8ビットをとり出し、(ロ)前記NX8ビッ
トのデータと前記定数とアンドをとり、(ハ)前記カウ
ンタの設定値だけシフトし、に)そのシフトされたデー
タをメモリの出力データに書き込み、(ホ)前記U)よ
シに)にいたる行程を前記入力データを前記とり出すま
で繰返すことを特徴とするメモリの編集転送方法によっ
てなされる。
[Means and effects for solving the problems] The present invention provides a memory editing and transfer method that solves the above problems, and the means is to solve the above problems.
In a memory editing method in which input data (N bytes) is cut into m bits and transferred, the quotient obtained by dividing the m bits by 8 is set in a counter, and the m bit constant is set for the Nx8 bit area. Then, (a) take out the input data NX8 bits, (b) AND the data of the NX8 bits and the constant, (c) shift by the setting value of the counter, and (d) the shifted data. is written in the output data of the memory, and the steps up to (E) above (U) and (C) are repeated until the input data is taken out.

〔実施例〕〔Example〕

以下図面を参照して本発明の実施例を詳細に説明する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は本発明にか\る方法の手順を説明する図であシ
、第1図は左づめ32ビット(4)くイト)のデータを
19ピット単位に切って転送する場合の手JIiKつい
て説明する。
Fig. 1 is a diagram explaining the procedure of the method according to the present invention. Fig. 1 shows the method used when cutting left-justified 32-bit (4) bit data into 19-bit units and transferring it. explain about.

まず第1図(a)に示すごとく初期設定を行なう。First, initial settings are performed as shown in FIG. 1(a).

すなわち第1図0)において出力情報アドレスセット1
を行ない出力情報域4をクリアするとともに、カウンタ
2に零をセットし、レジスタ3には19を8で刺した余
シをカウンタの増分値を設定し、且つ定数6を作成する
。これは1から19ピツトまでは@1”を設定し、20
ビットから32ビット目の13ビットに対しては零を設
定する。
In other words, in Figure 1 0), output information address set 1
is carried out to clear the output information area 4, set the counter 2 to zero, set the increment value of the counter to the remainder obtained by multiplying 19 by 8, and create a constant 6 in the register 3. This sets @1” for 1 to 19 pits, and 20
The 13 bits starting from the 32nd bit are set to zero.

つぎに第1図(b)K示すように入力データ7aを取シ
こみ、これを作成された定数とアンドをとりそのアンド
されたデータ(D、) 8を出力データ9に書き込む。
Next, as shown in FIG. 1(b)K, input data 7a is input, this is ANDed with the created constant, and the ANDed data (D,) 8 is written as output data 9.

つぎに取シ込まれた入力データを出力データ領域に書き
込むにあたってはカウンタの増分値3だけのシフトを必
要とする。これについて第1図(C)Kよシ説明する。
The next time the input data is written into the output data area, the counter needs to be shifted by an increment of 3. This will be explained with reference to FIG. 1(C)K.

入力情報アドレス−セットおよび出力情報アドレスセッ
ト1をクリアし、カウンタ2に対しては第1図(a) 
Kおける値にカウンタ増分値を加えた値 x’oo’十カクンタ増分値 を設定しカウンタをチェックする。カウンタに増分値3
づつ足していくと第1図(e)の3に示すように3回目
に桁上シC3が発生するのでそのときは出力情報アドレ
スセットlの内容に3を足すことになる。この桁上りを
チェックするためカウンタをX’03’とアンドをとる
Input information address set and output information address set 1 are cleared, and for counter 2, as shown in FIG. 1(a)
Set the value x'oo' which is the value at K plus the counter increment value and check the counter. Increment value 3 to counter
As the numbers are added one by one, a carry C3 occurs at the third time as shown at 3 in FIG. 1(e), and at that time, 3 is added to the contents of the output information address set l. To check this carry, the counter is ANDed with X'03'.

2度目に取シ込まれた入力データを出力データ領域に書
込む手順を第1図(d)によシ説明する。入力されたデ
ータ7bは定数6とともにアンドをとられその結果8は
カウンタの増分値3bだけ右方ヘシフトされそのシフト
された結果8bは出力データ9に書込まれる。
The procedure for writing the second input data into the output data area will be explained with reference to FIG. 1(d). The input data 7b is ANDed with the constant 6, the result 8 is shifted to the right by the increment value 3b of the counter, and the shifted result 8b is written to the output data 9.

第1図の)は入力データの転送を完了した出力データ9
の状態を示す。
) in Figure 1 is the output data 9 that has completed the input data transfer.
Indicates the status of

第2図に第1図における動作の手順をフローチャー)K
て示す。ブロック10においてスタートされるとまずブ
ロックllrζおいて第1図(a) Ic示すようなカ
ウンタ、定数、カウンタ増分値の初期値が設定される。
Figure 2 shows the flowchart of the operation procedure in Figure 1)
Shown. When the process is started in block 10, initial values of a counter, a constant, and a counter increment value as shown in FIG. 1(a) Ic are first set in block llrζ.

ついでブロック12において第1図(b)K示すように
入力データの取シ出しが行なわれ、ブロック13におい
て定数とのアンドがとられる。ブロック14においてカ
ウンタの増分値だけのシフトが行なわれるのであるが、
゛最初の入力データに対してはシフトが行なわれない。
Next, in block 12, input data is extracted as shown in FIG. 1(b)K, and in block 13, an AND operation is performed with a constant. In block 14, the counter is shifted by the increment value.
``No shift is performed on the first input data.

第2回目の入力データからシフトが行なわれるのであっ
てこれは第1図(ト))および(d)を比較してみれば
明らかである。
The shift is performed from the second input data, and this is clear from a comparison of FIGS. 1(g) and 1(d).

ついでブロック14の結果はブロック1−5において出
力データにオアライトされ、ブロック16゜17 、1
’ 8においてカウンタ、出力アドレス、入カアドレス
が更新され、ブロンク12ないし19に至る工程はデー
タの堆シ込みが終了するまで繰返される。
The result of block 14 is then or-written to the output data in blocks 1-5, and blocks 16, 17, 1
8, the counter, output address, and input address are updated, and the steps leading to bronches 12 to 19 are repeated until the data has been deposited.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明したように、本発明によればプログラム
を作シ直すことなく簡単にある形式の入力データを任意
のピット単位に切って転送できるのでその効果は頗る大
なるものがある。
As described in detail above, according to the present invention, input data of a certain format can be easily cut into arbitrary pit units and transferred without rewriting the program, so the effect is very great.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明Kか\る方法の手順を説明する図、第2
図は第1図の手順の動作を説明するためのフローチャー
ト、第3図は入力データをビット単位に切って転送する
手段の入力データと出力データとの相互関係を示す図で
ある。 図面において、1は出力情報アドレス、2はカウンタ、
3はカウンタ増分値、4は出力情報域領域、5は入力情
報アドレス、6は定数、7a7bは入力情報、9は出力
データをそれぞれ示す。 第3図
Figure 1 is a diagram explaining the procedure of the method of the present invention, Figure 2 is a diagram explaining the procedure of the method according to the present invention.
FIG. 3 is a flowchart for explaining the operation of the procedure shown in FIG. 1, and FIG. 3 is a diagram showing the mutual relationship between input data and output data of means for cutting input data into bits and transferring them. In the drawing, 1 is an output information address, 2 is a counter,
3 indicates a counter increment value, 4 indicates an output information area, 5 indicates an input information address, 6 indicates a constant, 7a7b indicates input information, and 9 indicates output data. Figure 3

Claims (1)

【特許請求の範囲】[Claims] 左づめでストアされたN×8ビット(Nバイト)の入力
データをmビット単位に切って転送するメモリの編集方
法において、前記mビットを8にて除した商をカウンタ
に設定し且つ前記N×8ビットの領域に対し前記mビッ
トの定数を設定し、ついで(イ)入力データN×8ビッ
トをとり出し、(ロ)前記N×8ビットのデータと前記
定数とアンドをとり、(ハ)前記カウンタの設定値だけ
シフトし、(ニ)そのシフトされたデータをメモリの出
力データに書き込み、(ホ)前記(イ)より(ニ)にい
たる行程を前記入力データを前記とり出すまで繰返すこ
とを特徴とするメモリの編集転送方法。
In a memory editing method in which input data of N×8 bits (N bytes) stored left-justified is cut into m bits and transferred, the quotient obtained by dividing the m bits by 8 is set in a counter, and the quotient obtained by dividing the m bits by 8 is set in a counter, and Set the m-bit constant for the 8-bit area, then (a) take out the input data N x 8 bits, (b) AND the N x 8-bit data and the constant, and (c) Shifting the counter by the set value, (d) writing the shifted data to the output data of the memory, and (e) repeating the steps from (b) to (d) until the input data is extracted. A memory editing transfer method characterized by:
JP16651884A 1984-08-10 1984-08-10 Memory editing and transfer method Pending JPS6145341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16651884A JPS6145341A (en) 1984-08-10 1984-08-10 Memory editing and transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16651884A JPS6145341A (en) 1984-08-10 1984-08-10 Memory editing and transfer method

Publications (1)

Publication Number Publication Date
JPS6145341A true JPS6145341A (en) 1986-03-05

Family

ID=15832803

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16651884A Pending JPS6145341A (en) 1984-08-10 1984-08-10 Memory editing and transfer method

Country Status (1)

Country Link
JP (1) JPS6145341A (en)

Similar Documents

Publication Publication Date Title
JPS6145341A (en) Memory editing and transfer method
JPS61103241A (en) Information processor
JP2715871B2 (en) Variable length coding method
GB1593136A (en) Data processing
JPH0430073B2 (en)
JPS623330A (en) Adder
JP2606580B2 (en) Numerical data calculation method
JPS6148174B2 (en)
JPS5851330A (en) Character processor
JPH0667827A (en) Data display control device
JP3055558B2 (en) n-bit arithmetic unit
JPS63142430A (en) Address generating system
JPS61267162A (en) Data transferring device
JPS5860373A (en) Time band setting system for electronic register
JPS58140858A (en) Transfer system for arithmetic data
JPS6142184Y2 (en)
JPH0625966B2 (en) Micro program controller
JPH0440554A (en) Character data processor
JPS592160A (en) Write controlling system to data base
JPH1083176A (en) Bold processing device, printer and bold processing method
JPH0619679A (en) Data condensing method
JPH04182823A (en) Parameter setting device
JPS6316366A (en) Character edition processing system
JPS63314637A (en) Data processing system
JPS63233480A (en) Pipeline processing specifying system