Use structs

git-svn-id: svn://svn.cc65.org/cc65/trunk@2710 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-03 20:23:09 +00:00
parent 4fa1f8ba97
commit a1092ca7da
2 changed files with 17 additions and 14 deletions

View File

@@ -26,11 +26,13 @@
; Table with offsets into struct utsname
fieldoffs:
.byte utsname_sysname
.byte utsname_nodename
.byte utsname_release
.byte utsname_version
.byte utsname_machine
.byte utsname::sysname
.byte utsname::nodename
.byte utsname::release
.byte utsname::version
.byte utsname::machine
fieldcount = * - fieldoffs
;--------------------------------------------------------------------------
@@ -45,7 +47,7 @@ fieldoffs:
stx tmp1 ; Field number
next: ldy tmp1
cpy #utsname_fieldcount
cpy #fieldcount
beq done
inc tmp1 ; Bump field counter
lda fieldoffs,y ; Get next field offset