Jump to content
  • Advertisement

Recommended Posts

I am trying to make a map editor with Assembly and C...

 

Everything used to work, but now, I get these errors:

 

cd C:\Editor
wmake -f C:\Editor\Editor.mk -h -e C:\Editor\Editor.exe
wasm SOURCE\MEASM.ASM -i="C:\WATCOM/h" -mf -6r -d1 -w4 -e25 -zq
SOURCE\MEASM.ASM(2): Error! E032: Syntax error
SOURCE\MEASM.ASM(3): Error! E032: Syntax error
SOURCE\prologue.mac(1): Error! E032: Syntax error
SOURCE\prologue.mac(1): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(4): Error! E535: Procedure must have a name
SOURCE\prologue.mac(4): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(6): Error! E523: Segment name is missing
SOURCE\prologue.mac(6): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(11): Error! E535: Procedure must have a name
SOURCE\prologue.mac(11): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(14): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(14): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(15): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(15): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(19): Error! E506: Block nesting error
SOURCE\prologue.mac(19): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(22): Error! E535: Procedure must have a name
SOURCE\prologue.mac(22): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(24): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(24): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(25): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(25): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(28): Error! E535: Procedure must have a name
SOURCE\prologue.mac(28): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(30): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(30): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(31): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(31): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(32): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(32): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(33): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(33): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(34): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(34): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(37): Error! E535: Procedure must have a name
SOURCE\prologue.mac(37): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(39): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(39): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(40): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(40): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(41): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(41): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\prologue.mac(42): Error! E525: Data emitted with no segment
SOURCE\prologue.mac(42): Note! N591: included by file SOURCE\MEASM.ASM(4)
SOURCE\MEASM.ASM(5): Error! E032: Syntax error
SOURCE\MEASM.ASM(6): Error! E032: Syntax error
SOURCE\MEASM.ASM(9):  
Error(E42): Last command making (C:\Editor\MEASM.obj) returned a bad status
Error(E02): Make execution terminated
Execution complete

 

 

I haven't used assembly for a while, and I don't really remember how to fix these errors.

Here is the main assembly file:

 

        IDEAL
        JUMPS
        include "prologue.mac"
        P386            ; 386 specific opcodes and allows all the necessary crap...
        P387            ; Allow 386 processor


        MASM
        .MODEL FLAT     ;32-bit OS/2 model
        .CODE
        IDEAL

        PUBLIC          SetPalette2_
        PUBLIC          SetVGAmode_
        PUBLIC          SetTextMode_
        PUBLIC          inkey_
        PUBLIC          PutHex_

;==============================================================================
; void SetPalette2(unsigned char *PalBuf,short count);
;==============================================================================

Proc    SetPalette2_ near
        push    esi

        mov     esi,eax
        mov     cx,dx
        mov     bx,0
        cld
        mov     dx,3C8H
sp210:
        mov     al,bl
        out     dx,al
        inc     dx
        lodsb
        out     dx,al
        lodsb
        out     dx,al
        lodsb
        out     dx,al
        dec     dx
        inc     bx
        loop    sp210

        pop     esi
        ret
        endp


;==============================================================================
; void SetVGAmode(void);
;==============================================================================
Proc    SetVGAmode_  near
        push    ebp
        mov     ax,13h
        int     10h             ; Set 320x200x256
        pop     ebp
        ret
        endp

;==============================================================================
;
;==============================================================================
Proc    SetTextMode_ near
        push    ebp
        mov     ax,3
        int     10h
        pop     ebp
        ret
        endp

;==============================================================================
;
;==============================================================================
Proc  inkey_ near
        xor     eax,eax
        mov     ah,1            ;see if key available
        int     16h
        jz      ink080          ;nope
        xor     ax,ax
        int     16h
        jmp     short ink090

ink080:
        xor     ax,ax
ink090:
        ret
        endp

;==============================================================================
;
;==============================================================================
Proc    HexOut_ near
        and     al,15
        cmp     al,10
        jb      short hex010
        add     al,7

hex010:
        add     al,'0'
        stosb
        ret
        endp

;==============================================================================
; void PutHex(char *buf,UINT mCode);
;==============================================================================
Proc    PutHex_ near
        push    edi
        mov     edi,eax
        mov     eax,edx
        shr     al,4
        call    HexOut_
        mov     eax,edx
        call    HexOut_
        xor     al,al
        stosb
        pop     edi
        ret
        endp
        end

 

This file includes another file that I found on the Internet a while ago called "Prologue.MAC"

 

Here is the code for it:

 

P386


Macro	 SETUPSEGMENT

SEGMENT _TEXT	PARA PUBLIC 'CODE'
	ASSUME	CS:_TEXT

	Endm

macro   PENTER  STORAGE
;; 17 - Enter a procedue with storage space
;; Procedure enter, uses the 286/386 ENTER opcode
	push	ebp
	mov	ebp,esp
        IF      STORAGE
	sub	esp,STORAGE
        ENDIF
ENDIF
        endm

macro   PLEAVE
;; 18 - Exit a procedure with stack correction.
	mov	esp,ebp
	pop	ebp
        endm

macro   PushCREGS
;; 19 - Save registers for C
        push    es
	push	ds   ;The Kernel is responsible for maintaining DS
	push	esi
	push	edi
        cld
        endm

macro   PopCREGS
;; 20 - Restore registers for C
	pop	edi
	pop	esi
	pop	ds ;The Kernel is responsible for maintaining DS
        pop     es
        endm

 

 

Can I have an Idea of what I could do to fix these errors?

 

 

I am using OpenWatcom compiler. I *have* gotten Watcom to work before. In fact, this is one of the first few times it has not worked with me... 

 

 

Thanks in advance!

 

 

-yaboiryan

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!