עבור לתוכן
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.

Assembly |mips32 מערך של תווים

Featured Replies

פורסם

יש תרגיל שבו צריך להחליף צמד תווים ואם הם זהים אז לקחת את התו הימני.

יש לי את הסגמנט ולמען האמת אין לי שמץ של מושג איך לעשות את זה.

אשמח להכוונה.

תודה

 

# Computer Architecture
#Question 1:        	
# Input: 1)in buf (in the data segment) string of exactly 10 chars  
#        
# 
# Output:     1)swap each pair chars in the string
#	    (if the pair identical change the second to '*' )
#		2)print buf in reverse
##
## 
# Example
# buf=		 "aabb456788"
#
#After swap buf= "a*b*54768*

#
# in reverse  = "*86745*b*a"

################# Data segment #####################
.data
buf:    .ascii "aabb456788"	




################# Code segment #####################
.text
.globl main
main:	# main program entry

#answer
	la $t0,buf
	lw $t1,1(buf)
	beq $t0,$t1,swap_same 
swap_same :
	lw $t1,1(buf)
	sw $t1, 6
		
				
# end of program
exit:	
	li $v0,10
	syscall

 

ארכיון

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

דיונים חדשים

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.