Code:
.xlist
include stdlib.a
includelib stdlib.lib
.list
dseg segment para public ‘data’
; Global variables go here:
dseg ends
cseg segment para public ‘code’
assume cs:cseg, ds:dseg
; Variables that wind up being used by the standard library routines.
; The MemInit routine uses “PSP” and “zzzzzzseg” labels. They must be
; present if you intend to use getenv, MemInit, malloc, and free.
public PSP
PSP dw ?
;--------------------------------------------
; Here is a good place to put other routines:
;-----------------------------------------------------------------
; Main is the main program. Program execution always begins here.
Main proc
mov cs:PSP, es ;Save pgm seg prefix
mov ax, seg dseg ;Set up the segment
registers
mov ds, ax
mov es, ax
mov dx, 0
meminit
jnc GoodMemInit
print
db “Error initializing memory
manager”,cr,lf,0
jmp Quit
GoodMemInit:
;***************************************************************************
; Put your main program here.
;***************************************************************************
Quit: ExitPgm
Main endp
cseg ends
; Allocate a reasonable amount of space for the stack (2k).
sseg segment para stack ‘stack’
stk db 256 dup (“stack “)
sseg ends
; zzzzzzseg must be the last segment that gets loaded into memory!
zzzzzzseg segment para public ‘zzzzzz’
LastBytes db 16 dup (?)
zzzzzzseg ends
end Main
.xlist
include stdlib.a
includelib stdlib.lib
.list
dseg segment para public ‘data’
; Global variables go here:
dseg ends
cseg segment para public ‘code’
assume cs:cseg, ds:dseg
; Variables that wind up being used by the standard library routines.
; The MemInit routine uses “PSP” and “zzzzzzseg” labels. They must be
; present if you intend to use getenv, MemInit, malloc, and free.
public PSP
PSP dw ?
;--------------------------------------------
; Here is a good place to put other routines:
;-----------------------------------------------------------------
; Main is the main program. Program execution always begins here.
Main proc
mov cs:PSP, es ;Save pgm seg prefix
mov ax, seg dseg ;Set up the segment
registers
mov ds, ax
mov es, ax
mov dx, 0
meminit
jnc GoodMemInit
db “Error initializing memory
manager”,cr,lf,0
jmp Quit
GoodMemInit:
;***************************************************************************
; Put your main program here.
;***************************************************************************
Quit: ExitPgm
Main endp
cseg ends
; Allocate a reasonable amount of space for the stack (2k).
sseg segment para stack ‘stack’
stk db 256 dup (“stack “)
sseg ends
; zzzzzzseg must be the last segment that gets loaded into memory!
zzzzzzseg segment para public ‘zzzzzz’
LastBytes db 16 dup (?)
zzzzzzseg ends
end Main
Ovaj program nikako ne mogu da prevedem! Pokusavao sam i sa MASMom verzije 6 i 7.
U MASM editoru koji dolazi zajedno sa njim (QEDITOR) prijavljuje sledece greske:
Code:
Assembling: F:\test\SHELL.asm
F:\masm32\stdlib\INCLUDE\stdlib.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\stdout.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\stdin.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\memory.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\conv.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\strings.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\charsets.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\fp.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\misc.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\lists.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\ser.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\pattern.a(26) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\date.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\time.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\process.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\file.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\test\SHELL.asm(6) : error A2044: invalid character in file
F:\test\SHELL.asm(10) : fatal error A1010: unmatched block nesting : dseg
Assembling: F:\test\SHELL.asm
F:\masm32\stdlib\INCLUDE\stdlib.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\stdout.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\stdin.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\memory.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\conv.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\strings.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\charsets.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\fp.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\misc.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\lists.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\ser.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\pattern.a(26) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\date.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\time.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\process.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\masm32\stdlib\INCLUDE\file.a(1) : error A2214: GROUP directive not allowed with /coff option
F:\test\SHELL.asm(6) : error A2044: invalid character in file
F:\test\SHELL.asm(10) : fatal error A1010: unmatched block nesting : dseg
Znaci prijavljuje greske u fajlovima UCR biblioteke koji su takoreci provereni za rad sa MASMom.
Dok kada pozovem ml iz komandne linije prijavljuje samo ove greske (zadnje dve):
Code:
Assembling: SHELL_comments.asm
SHELL_comments.asm(6) : error A2044: invalid character in file
SHELL_comments.asm(10) : fatal error A1010: unmatched block nesting : dseg
Assembling: SHELL_comments.asm
SHELL_comments.asm(6) : error A2044: invalid character in file
SHELL_comments.asm(10) : fatal error A1010: unmatched block nesting : dseg
Da li je greska ipak u programu ili sam nesto zaboravio ili lose konfigurisao ili mozda ima veze sto se prevodi na Athlonu?
Svaki savet u vezi sa ovim problemom je dobrodosao. Nadam se da je jos neko koristio UCR biblioteku sa MASMom pri ucenju iz knjige "The art of assembly programming language".
Unapred hvala.