Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by ignacio vacca ( 15 years ago )
ORG 1000H
;MEMORIA
NUM DB ?
ROTA DB ?
RES DB ?
;PROGRAMA PRINCIPAL
ORG 2000H
MOV AX,NUM
PUSH AX
MOV AX,ROTA
PUSH AX
MOV AX,OFFSET RES
PUSH AX
CALL ROTARIZQ
POP AX
POP AX
POP AX
HLT
END
;SUBRUTINAS
ORG 3000H
ROTARIZQ: PUSH BX
MOV BX,SP
PUSH AX
PUSH CX
PUSH DX
ADD BX,6
MOV CX,[BX]
ADD BX,2
MOV AX,[BX]
CMP CX,0
JZ FIN
ROTAR: ADD AX,AX
ADC AX
DEC CX
JNZ ROTAR
FIN: SUB BX,4
MOV BYTE PTR [BX],AL
POP DX
POP CX
POP AX
POP BX
RET
Revise this Paste