From: "Max Int" Newsgroups: comp.os.msdos.djgpp Subject: CPP for NASM files Lines: 66 X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Message-ID: Date: Wed, 31 Mar 1999 14:07:19 +0800 NNTP-Posting-Host: 203.13.74.202 X-Trace: newsfeed.slurp.net 922860449 203.13.74.202 (Wed, 31 Mar 1999 00:07:29 CDT) NNTP-Posting-Date: Wed, 31 Mar 1999 00:07:29 CDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com How can I get CPP to preprocess this type of ASM file? Any suggestions esd AT deakin DOT edu DOT au esd AT gbb DOT com DOT au #include ; must be the same as in sys/traps.h #define TRAP_STOP_EXECUTION 1 #define TRAP_CONTINUE_EXECUTION 0 %imacro ENTER_KERNEL 0 push dword ds push dword es pushad mov ax, KERNEL_DS mov ds, ax mov es, ax %endmacro %imacro LEAVE_KERNEL 0 popad pop dword es pop dword ds %endmacro [SECTION .text] [BITS 32] %imacro IRQ 2 GLOBAL _irq%1 EXTERN _proc_irq%1 EXTERN _num_irq%1 align 4 _irq%1: push dword ds push dword es pushad mov ax, KERNEL_DS mov ds, ax mov es, ax cmp dword [_proc_irq%1], 0 je .exit mov eax, [_proc_irq%1] push dword %1 call eax add esp, 4 inc dword [_num_irq%1] .exit: mov al, 0x20 out %2, al popad pop dword es pop dword ds iret %endmacro IRQ 0, 0x20 IRQ 1, 0x20 IRQ 2, 0x20 IRQ 3, 0x20 IRQ 4, 0x20