Click here to Skip to main content
15,868,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C++
;bios routine direct calling

page 100,100
title 'bios routine'

.model small

.stack 64

.data

.code
main proc far
	mov ax,@data
	mov ds,ax
	mov es,ax
	
	
	; calling bios routine to show a charaacter on the screen
	
	mov ah, 0x0e
	mov al, '!'
	int 0x10
	

	;return to o.s
	mov ax,4c00h
	int 21h
	
	main endp
end main

when i want to assemble this code in masm615 it gives me this error :
bios.asm(21) :error A2206 : missing operator in expression
bios.asm(23) :error A2206 : missing operator in expression
Posted

1 solution

The C style '0x' hex prefix is not supported by MASM. Use the 'h' postfix:
ASM
mov ah, 0eh
mov al, '!'
int 10h
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900