Program

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Program

953件の閲覧回数
making
Contributor I

I am having problems wtih this program and am stuck does anyone have suggestions

 

; algorithm for equation of form: z = (2w+3)/4

 XDEF Entry, main
     XREF __SEG_END_SSTACK   

RAM_Data: SECTION

       ORG $1100
w  dc.b  #100
 
       ORG $1110
; output value
z    ds.w  1

Code:     SECTION
main:
Entry:   

ldaa w  

ldab #2
mul           ; d = a x b 

addd #3   

ldx #4    
idiv          ; x = d/x,   d=rem

xgdx      ; get quotient in d so it can be...
std z         ; ... stored to memory

L1: bra L1  ; program ends in a loop

***** end of file *****

ラベル(1)
0 件の賞賛
返信
1 返信

862件の閲覧回数
astro_goto
Contributor III

Only thing wrong with your program is the # sign in front of the value 100.

0 件の賞賛
返信