עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

שגרה רקורסיבית באסמלבר

Featured Replies

פורסם

לילה טוב,

אני צריך לכתוב תכנית שתחשב את האיבר ה-i בסדרת פיבונצ'י.

פתרתי את הבעיה בלי שגרה אבל אני לא יודע בדיוק איך לשנות את התכנית כך שתבצע את הנדרש:

;computes the i Fibonacci member;
JMP Start

I: DB 01 ;[02] The i fibo
Result: DB 00 ;[03] The resutl

Start:
MOV AL,00 ;Holds one member
MOV BL,01 ;Holad another member
MOV DL,01 ;Counter
LOOP:
CMP DL,[02] ;Check if last num
JZ EndProg ;if so- endprog
ADD AL,BL ;Adding AL & BL
PUSH AL ;Push AL to stuck
PUSH BL ;Push BL to stuck
POP AL ;Pop BL into AL
POP BL ;Pop AL into BL
INC DL ;DL++
JMP LOOP

EndProg: MOV [03],AL ;Put the result in its place



END

פורסם

דבר ראשון, בשביל לולאות תשתמש ב- CX.

בנוסף, שים לב ש- POP ו- PUSH עובדים על המחסנית. כדאי להשתמש ברגיסטרים אם אפשר כדי להחליף בין נתונים.

מה התוצאות שאתה מקבל?

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.