summaryrefslogtreecommitdiffstats
path: root/acc.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-03-05 19:31:52 -0800
committerH. Peter Anvin <hpa@zytor.com>2013-03-05 19:31:52 -0800
commit88a77633e643602cdf631fb432d5e5fffbb6a48c (patch)
tree3a4cdec4b671d40efdf748c8fb10049437c5378b /acc.asm
parent331a16cba36fafd32babbbd543398f3575d52a91 (diff)
downloadvirtio9p-88a77633e643602cdf631fb432d5e5fffbb6a48c.tar.gz
virtio9p-88a77633e643602cdf631fb432d5e5fffbb6a48c.tar.xz
virtio9p-88a77633e643602cdf631fb432d5e5fffbb6a48c.zip
Use procedure start/end macros
Use procedure start/end macros instead of opencoding all the directives.
Diffstat (limited to 'acc.asm')
-rw-r--r--acc.asm46
1 files changed, 14 insertions, 32 deletions
diff --git a/acc.asm b/acc.asm
index 23c0b4d..b36ded7 100644
--- a/acc.asm
+++ b/acc.asm
@@ -36,13 +36,10 @@
* Always accept an incoming request.
* ------------------------------------------------------------------------- */
- .globl acc_always
-acc_always:
+GPROC(acc_always)
clc
retw
-
- .size acc_always,.-acc_always
- .type acc_always,@function
+END(acc_always)
/* ------------------------------------------------------------------------- *
* acc_file
@@ -50,21 +47,19 @@ acc_always:
* Check drive in the System File Table
* ------------------------------------------------------------------------- */
- .globl acc_file
-acc_file:
+GPROC(acc_file)
movw F_DI,%si
movw F_ES,%fs
addw $SFT_DEVINFO,%si /* Byte 5 in SFT entry = drive */
/* fall through */
- .size acc_file,.-acc_file
- .type acc_file,@function
+END(acc_file)
/*
* Available for multiple users of a modified drive number
* at %fs:(%si) - specifically a zero-based drive number where
* bit 6 is expected to be set for a conforming redirector.
*/
-acc_drive_common:
+LPROC(acc_drive_common)
movb %fs:(%si),%al /* Device info word (low half) */
andb $0x5f,%al /* Drive number + conforming bit (6) */
incw %ax
@@ -72,21 +67,17 @@ acc_drive_common:
jne acc_fail
/* CF = 0 if equal */
retw
- .size acc_drive_common,.-acc_drive_common
- .type acc_drive_common,@function
+END(acc_drive_common)
/* ------------------------------------------------------------------------- *
* acc_findnext
* ------------------------------------------------------------------------- */
- .globl acc_findnext
-acc_findnext:
+GPROC(acc_findnext)
lfsw dos_sdafn,%si
addw $SDN_SEARCHDATA,%si /* First byte in srcrec = drive no */
jmp acc_drive_common
-
- .size acc_findnext,.-acc_findnext
- .type acc_findnext,@function
+END(acc_findnext)
/* ------------------------------------------------------------------------- *
* acc_never
@@ -95,14 +86,11 @@ acc_findnext:
* anything with it anyway.
* ------------------------------------------------------------------------- */
- .globl acc_never
-acc_never:
+GPROC(acc_never)
acc_fail: /* Used as common tail */
stc
retw
-
- .size acc_never,.-acc_never
- .type acc_never,@function
+END(acc_never)
.globl fxn_unknown
fxn_unknown = acc_never
@@ -114,8 +102,7 @@ fxn_unknown = acc_never
* determine if this is for us.
* ------------------------------------------------------------------------- */
- .globl acc_cds
-acc_cds:
+GPROC(acc_cds)
lfsw dos_sdafn,%si
addw $SDN_CDS,%si
cmpw $CDS_MAGIC,%fs:CDS_DPBPTR(%si) /* Our magic? */
@@ -128,19 +115,14 @@ acc_cds:
/* XXX: check for a character device */
/* CF = 0 if equal */
retw
-
- .size acc_cds,.-acc_cds
- .type acc_cds,@function
+END(acc_cds)
/* ------------------------------------------------------------------------- *
* acc_qualify
* ------------------------------------------------------------------------- */
- .globl acc_qualify
-acc_qualify:
+GPROC(acc_qualify)
movw F_SI,%si
movw F_DS,%fs
jmp acc_drive_common
-
- .size acc_qualify,.-acc_qualify
- .type acc_qualify,@function
+END(acc_qualify)