Please use the following documentation for your assembly language programs:
;*********************************************************************** ; Purpose: ; ; Inputs: ; ; Outputs: ; ; Author: ; ; Date: ; ; Algorithm: ;********************************************************************** ;********************************************************************** ; STACK DEFINITION ;********************************************************************** .STACK 100h ;********************************************************************** ; CONSTANT DEFINITIONS ;********************************************************************** .CONST ;********************************************************************** ; VARIABLE DEFINITIONS ;********************************************************************** .DATA ;********************************************************************** ; CODE SEGMENT ;********************************************************************** .CODEAs for internal documentation, I would like you to use a high level pseudo-code like notation so that I can understand what is going on in your code. Here is a sample:
call ReadInt ; Place upper bound of loop into eax (value is <= 100) mov cx, ax mov ax, 0 ; Initialize sum to 0 top: add ax, cx ; sum = sum + counter loop top ; decrememt counter by 1 and go to top if not 0 call WriteDec ; output the sum 1 + 2 + ... + upper