Hello all, I have tried vigoriously and cannot find out what this means, this homework is due tommorow and i need major help, basicalyl what we have to do is write an ascii table which pops up on the screen, i have this code thus far but i get the following error messages:

1>Assembling...
1> Assembling: .\main.asm
1>.\main.asm(371) : warning A4023: with /coff switch, leading underscore required for start address : start
1>Linking...
1>main.obj : fatal error LNK1190: invalid fixup found, type 0x0001
1>Build log was saved at "file://c:\Irvine\examples\Project_sample\Debug\BuildLog.htm"
1>Project - 1 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

this is my project

assume cs:code

code segment 'code'
ORG 100h

.386

start: jmp MY_START

; beginning of data section
BUFFER dw 2000 dup(?)
string db "D H B C",0

; end of data section
MY_START:

mov ax,0B800h
mov es,ax
call SCREEN_SAVER
M1: call SCREEN_CLEARER
call L0_95

check1:
mov ah,10h
int 16h

cmp ax, 1071h
je EXIT

cmp ax, 4DE0h
je M2

jmp check1


M2: call SCREEN_CLEARER
call L96_191

check2:
mov ah,10h
int 16h

cmp ax,4BE0h
je M1

cmp ax,4DE0h
je M3

cmp ax,1071h
je EXIT

jmp check2


M3: call SCREEN_CLEARER
call L192_255

check3:
mov ah,10h
int 16h

cmp ax,4BE0h
je M2

cmp ax,1071h
je EXIT

jmp check3


EXIT:
call SCREEN_RESTORER
jmp REAL_EXIT

SCREEN_SAVER:
mov cx,2000
mov bx,0
L1:
mov ax,es:[bx]
mov BUFFER[bx],ax
add bx,2
loop L1
ret

SCREEN_CLEARER:
mov ax,1720h
mov cx,2000
mov bx,0
L2:
mov es:[bx],ax
add bx,2
loop L2
ret

SCREEN_RESTORER:
mov cx,2000
mov bx,0
L3:
mov ax,BUFFER[bx]
mov es:[bx],ax
add bx,2
loop L3
ret


L0_95:
mov si,6
mov cx,4

C1A:mov al,string[0]
mov es:[si],al
mov al,string[2]
mov es:[si+6],al
mov al,string[4]
mov es:[si+24],al
mov al,string[6]
mov es:[si+28],al
add si,40
loop C1A

mov si,122
mov bx,0
mov cx,4
C1B:push cx
mov cx,24
add si,40
C1C:push cx
call DEC_CONVERT
add si,2
call HEX_CONVERT
add si,2
call BIN_CONVERT
add si,2
call CHAR_CONVERT
inc bx
add si,126
pop cx
loop C1C
pop cx
sub si,3840
loop C1B

ret

L96_191:
mov si,6
mov cx,4

C2A:mov al,string[0]
mov es:[si],al
mov al,string[2]
mov es:[si+6],al
mov al,string[4]
mov es:[si+24],al
mov al,string[6]
mov es:[si+28],al
add si,40
loop C2A

mov si,122
mov bx,96
mov cx,4
C2B:push cx
mov cx,24
add si,40
C2C:push cx
call DEC_CONVERT
add si,2
call HEX_CONVERT
add si,2
call BIN_CONVERT
add si,2
call CHAR_CONVERT
inc bx
add si,126
pop cx
loop C2C
pop cx
sub si,3840
loop C2B

ret

L192_255:
mov si,6
mov cx,4

C3A:mov al,string[0]
mov es:[si],al
mov al,string[2]
mov es:[si+6],al
mov al,string[4]
mov es:[si+24],al
mov al,string[6]
mov es:[si+28],al
add si,40
loop C3A

mov si,122
mov bx,192
mov cx,4
C3B:push cx
mov cx,16
add si,40
C3C:push cx
call DEC_CONVERT
add si,2
call HEX_CONVERT
add si,2
call BIN_CONVERT
add si,2
call CHAR_CONVERT
inc bx
add si,126
pop cx
loop C3C
pop cx
sub si,2560
loop C3B

ret

DEC_CONVERT:
mov ax,bx
mov cx,-1
mov dx,-1

D1: inc cx
sub ax,100
jge D1


D2: push cx
add cl,'0'
mov es:[si],cl
add si,2
mov ax,bx

pop cx
cmp cx,1
jl D4

D3: sub ax,100
add dx,10
loop D3

D4: mov cx,-1

D5: inc cx
inc dx
sub ax,10
jge D5

D6: add cl,'0'
mov es:[si],cl
add si,2
mov ax,bx

mov cx,dx

D7: sub ax,10
loop D7

D8: add al,'0'
mov es:[si],al
add si,2

ret

HEX_CONVERT:
mov al,bl
shr al,4;
call HEX_PRINT

mov al,bl
and al,00001111b
call HEX_PRINT

ret

HEX_PRINT:
cmp al, 10
jl HP1
je HP2

cmp al,11
je HP3

cmp al,12
je HP4

cmp al,13
je HP5

cmp al,14
je HP6

cmp al,15
je HP7

HP1:add al,'0'
mov es:[si],al
add si,2
jmp HP8

HP2:mov al,'A'
mov es:[si],al
add si,2
jmp HP8

HP3:mov al,'B'
mov es:[si],al
add si,2
jmp HP8

HP4:mov al,'C'
mov es:[si],al
add si,2
jmp HP8

HP5:mov al,'D'
mov es:[si],al
add si,2
jmp HP8

HP6:mov al,'E'
mov es:[si],al
add si,2
jmp HP8

HP7:mov al,'F'
mov es:[si],al
add si,2

HP8:ret

BIN_CONVERT:
mov al,bl
mov cx,8
B1:
test al, 10000000b
je B2
mov ah,'1'
mov es:[si],ah
add si,2
shl al,1
loop B1
jmp B3

B2:
mov ah,'0'
mov es:[si],ah
add si,2
shl al,1
loop B1

B3:
ret

CHAR_CONVERT:
mov al,bl
mov es:[si],al
add si,2
ret

REAL_EXIT:
mov ah,4Ch
int 21h

code ends
end start

works fine with TASM, but i prefer to work with MASM , shouldnt the commands be the same?

include /masm32/include/masm32rt.inc 
.data
  asci db 0,0
.code
start:
  cls
  mov ebx,01
  mov esi,10 ;cr lf after 10 chars
@loop:
  mov byte ptr asci,bl
  cmp bl,13 ; unprintable chars
  je @f
  cmp bl,10
  je @f
  cmp bl,09
  je @f
  cmp bl,07
  je @f
  cmp bl,08
  je @f
  jmp @no_replace
@@:
  mov byte ptr asci,".";replace unprintable with "."
@no_replace:
  print addr asci," " ; print char
  print str$(ebx),", ",09 ; print dec code + tab
  dec esi 
  jnz no_cr
  print " ",13,10 ; cr&lf after 10 chars
  mov esi,10
no_cr:
  inc ebx;next char
  cmp ebx,255
  jbe @loop
exit
end start

masm32, not very beautiful, but it works ;-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.