問題タブ [pep8-assembly]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
assembly - アセンブル時にエラーが発生するのはなぜですか?
グローバル配列ベクトルを変換しようとしていますが、アセンブルするたびにエラーが発生します。インデックス付きアドレス指定を使用していますが、なぜこれが間違っているのかわかりません。
pep8-assembly - Why is Pascal's Triangle manifesting itself in the output of my array (not intended)?
I am having a problem getting my Pep/8 assembly program to produce the correct output. The goal is to input a number n followed by n numbers and then have the output place the first number at the end of the array. An example of input and correct output is as follows:
"Three numbers of which 1,2, and 3 are in the array." Input: 3 1 2 3
"The first number in the array, 1, is placed at the end of the array." Correct Output: 2 3 1
My input and output are:
Input: 3 1 2 3 Incorrect Output: 2 2 1 Desired Output: 2 3 1
Input: 4 1 2 3 4 Incorrect Output: 2 3 3 1 Desired Output: 2 3 4 1
Input: 5 1 2 3 4 5 Incorrect Output: 2 3 3 4 1 Desired Output: 2 3 4 5 1
The three parts of my assembly code can be seen at: http://militarystudents.files.wordpress.com/2009/11/pic1of3.png http://militarystudents.files.wordpress.com/2009/11/pic2of3.png http://militarystudents.files.wordpress.com/2009/11/pic3of3.png
The output for n = 1 and n = 2 comes out correctly. For n > 2 the output seems to repeat a portion of my input. I am using a global array list. Any information will be greatly appreciated.
assembly - デシからビンへのコンバーター (Pep/8 アセンブラーおよびシミュレーター)
deci (-32,768 ~ 32,767) を bin に変換するプログラムを作成する課題があります。出力は 16 ビットすべてを示す必要があります。たとえば、入力が 120 の場合、出力は 0000000001111000 になります。0 と 1 を逆に出力する方法がわかりません。120 を入力すると、次のようになります。0001111000000000。これは私がこれまでに持っているものです:
memory - スタック相対アドレス指定とスタック遅延アドレス指定
以下の 2 つのコード サンプルの s と sf の実際的な違いは何ですか?
スタック相対は Mem[SP + OprndSpec] のように見え、deffered は Mem[Mem[SP + OprndSpec]] のように見えることを理解しています。しかし、私が理解していないのは、これがどのように達成されるかです。
スタック延期
スタック相対
assembly - PEP8 数値でない場合は新しい入力を求める
年入力を(chariに)変換し、10進数として出力するこのコードがあります。私の問題は、誤って文字または空白が入力された場合、プログラムはエラーメッセージを出力し続けますが、新しい入力を再要求しません。たとえば、ABCD と入力すると、エラー メッセージが 4 回表示されて終了します。
入力年は 1900 年から 2049 年まで (両端を含む) である必要があります。
エラーを再現するには、例ごとに 19a0 または abcd を試してください。
ここでどこが間違っていますか?
assembly - PEP/8 で CHARI を使用してある番号を別の番号に移動する方法
Pep/8 を使用して複数の数値の平均を計算するプログラムを作成する必要があります。
私の主な問題は、彼が私たちに使用DECI
を許可しなかったことであり、使用CHARI
する必要がありますが、エラーが発生する前にユーザーがその行にスペースで区切られた最大 40 文字を入力できるため、番号から番号へと移動することはできません. 数字から数字へと移動し、それらを追加してから、その数で割る必要があります。数値は -53 から 48 までです。また、--40 などは使用できません。
どうやってやるの?
これは、この部分のために私が今まで持っているものです。
c++ - C++ を Pep/8 アセンブリ言語に変換 -- Char 配列
タイトルが示すように、現在、C++ プログラムを PEP/8 に変換する際に問題が発生しています。
プログラムの最初の部分は、char 配列の入力と出力を処理します。strInput 関数は、ユーザーが Enter キーを押すか、配列のサイズが 63 に達するまで、文字値を配列に読み込みます。ユーザーが Enter キーを押すと、'\n' の代わりに '0' が格納されます。配列が [63] に達すると、[64] に「0」が格納されます。strOut 関数は、'0' が見つかるか、配列の長さに達するまで、配列の内容を出力します。
現在のアセンブリ コードをいじっていますが、入力を求めるプロンプトが継続的に表示されます。Xレジスタやスタックからのオフセットに問題があると思います。任意の洞察をいただければ幸いです。
C++ コード: https://gist.github.com/anonymous/b690427aaf465dd7326a
ペップ/8: https://gist.github.com/anonymous/37a51a34f7eecb15f4ee
assembly - Pep/8 アセンブリ - 正しいブランチの検索
このプログラムは、答えの数値を足したり、引いたり、否定したりする基本的な小さな電卓です。加算、減算、および終了オプションは正常に機能しますが、NI を使用するたびに、その後に何も入力できません。私はelseif2に何か問題があると思っていますが、それをいじった後、頭を包むことができません。問題全体を間違って設定したのでしょうか、それともそのまま修正可能ですか?