All pastes #197070 Raw Edit

Stuff

public text v1 · immutable
·published 2006-10-11 02:06 UTC
rendered paste body
why is this code not working? I need to be able to display either of the pushed hex codes ascii vaues
push bp 	; save bp
mov bp,sp 	; put sp into bp
push 45h
push 4Ch
call showstack

showstack:
	mov al,[bp+4]; AL = [DS:SI]
      	or al, al	; Set zero flag if al=0
	;jz putstkd	; jump to putstkd if zero flag is set
	mov ah, 0x0e	; video function 0Eh (print char)
	mov bx, 0x0007	; color
  
	int 0x10
	;jmp showstack

putstkd:
	retn


but this code does work how could i get the top way working
push bp 	; save bp
	mov bp,sp 	; put sp into bp
 	push 45h
        push 4Ch
	

        MOV dx,[BP+2]	
        call showstack
showstack:
	mov al,dl; 
        
	or al, al	; Set zero flag if al=0
	;jz putstkd	; jump to putstkd if zero flag is set
	mov ah, 0x0e	; video function 0Eh (print char)
	mov bx, 0x0007	; color
  
	int 0x10
	;jmp showstack

putstkd:
	retn