old x86 assembly code but apparently wrong comment and synta
Posted: Wed Oct 17, 2018 1:02 am
I was reading minix driver code for tty. What puzzles me is that
one of the assembly files like like the following... what question is that
although the assembly looks like intel syntax... but the comment format is
totally wrong and the .define is not a valid syntax format either...
what kind of assembly is that? is gcc supposed to handle this? Could this be a
very very old assembly syntax that has become obsolete?
one of the assembly files like like the following... what question is that
although the assembly looks like intel syntax... but the comment format is
totally wrong and the .define is not a valid syntax format either...
what kind of assembly is that? is gcc supposed to handle this? Could this be a
very very old assembly syntax that has become obsolete?
Code: Select all
#
! This file contains two specialized assembly code routines to update the
! video memory. The routines can copy from user to video memory, or from
! video to video memory.
! sections
.sect .text; .sect .rom; .sect .data; .sect .bss
! exported functions
.define _mem_vid_copy ! copy data to video ram
.define _vid_vid_copy ! move data in video ram
! The routines only guarantee to preserve the registers the C compiler
! expects to be preserved (ebx, esi, edi, ebp, esp, segment registers, and
! direction bit in the flags).
.sect .text
!*===========================================================================*
!* mem_vid_copy *
!*===========================================================================*
! PUBLIC void mem_vid_copy(u16 *src, unsigned dst, unsigned count);
!
! Copy count characters from kernel memory to video memory. Src is an ordinary
! pointer to a word, but dst and count are character (word) based video offset
! and count. If src is null then screen memory is blanked by filling it with
! blank_color.
_mem_vid_copy:
push ebp
mov ebp, esp
push esi
push edi
push