;============================================================================== ;file :marble.asm ;author :Andre Long ;due :April 19, 2006 ;description :This program will use arrays to calulate prime numbers ;============================================================================== ;Procedures To INCLUDE Pcmac.inc ;macros EXTRN NEWLINE:FAR ;display a new line EXTRN GETDEC$:FAR ;gets 16-bit decimal number EXTRN PUTDEC$:FAR ;display 16-bit decimal number EXTRN PUTSTRNG:FAR ;display a string EXTRN xyConvertor: FAR ;============================================================================== .MODEL SMALL .586 .STACK 100h ;============================================================================== .DATA maxcups EQU 49 cups DB 50 DUP (0) blank DB ' ', '$' step DB ? messtest1 DB 'made it!', '$' messtest2 DB 'Hello', '$' ;============================================================================== .CODE marble proc _Begin mov cx, 0 start: cmp cx, maxcups mov al, 1 jbe loopA jmp doneA loopA: mov [cups + cx], al inc cl jmp start doneA: mov cl, 0 mov ah, 0 startB: cmp cl, maxcups jbe loopB jmp doneB loopB: mov al, [cups + cx] call putdec$ ;sPutStr blank inc cl jmp startB doneB: mov step, 0 mov cl, 0 call newline startC: cmp cl, maxcups jbe loopC jmp doneC loopC: mov bh, 0 mov bl, step mov al, [cups + bx] call xyConvertor call putdec$ add step, 2 inc cl jmp startC doneC: _Exit marble endp end marble