@@ -290,7 +290,7 @@ ACCESSOR(zuint8, pcl, MACRO, Z80_PCL, UINT2NUM, NUM2UINT )
290290ACCESSOR (zuint8 , sph , MACRO , Z80_SPH , UINT2NUM , NUM2UINT )
291291ACCESSOR (zuint8 , spl , MACRO , Z80_SPL , UINT2NUM , NUM2UINT )
292292ACCESSOR (zuint8 , xyh , MACRO , Z80_XYH , UINT2NUM , NUM2UINT )
293- ACCESSOR (zuint8 , yl , MACRO , Z80_XYL , UINT2NUM , NUM2UINT )
293+ ACCESSOR (zuint8 , xyl , MACRO , Z80_XYL , UINT2NUM , NUM2UINT )
294294ACCESSOR (zuint8 , ixh , MACRO , Z80_IXH , UINT2NUM , NUM2UINT )
295295ACCESSOR (zuint8 , ixl , MACRO , Z80_IXL , UINT2NUM , NUM2UINT )
296296ACCESSOR (zuint8 , iyh , MACRO , Z80_IYH , UINT2NUM , NUM2UINT )
@@ -670,92 +670,92 @@ void Init_z80(void)
670670 rb_define_const (module , "XY" , UINT2NUM (Z80_RESUME_XY ));
671671 rb_define_const (module , "IM0_XY" , UINT2NUM (Z80_RESUME_IM0_XY ));
672672
673- # define DEFINE_ACCESSOR (name , getter_arity ) \
674- rb_define_method(klass, #name, Z80__##name, getter_arity ); \
673+ # define DEFINE_ACCESSOR (name ) \
674+ rb_define_method(klass, #name, Z80__##name, 0 ); \
675675 rb_define_method(klass, #name "=", Z80__set_##name, 1);
676676
677- DEFINE_ACCESSOR (fetch_opcode , 0 )
678- DEFINE_ACCESSOR (fetch , 0 )
679- DEFINE_ACCESSOR (read , 0 )
680- DEFINE_ACCESSOR (write , 0 )
681- DEFINE_ACCESSOR (in , 0 )
682- DEFINE_ACCESSOR (out , 0 )
683- DEFINE_ACCESSOR (halt , 0 )
684- DEFINE_ACCESSOR (nop , 0 )
685- DEFINE_ACCESSOR (nmia , 0 )
686- DEFINE_ACCESSOR (inta , 0 )
687- DEFINE_ACCESSOR (int_fetch , 0 )
688- DEFINE_ACCESSOR (ld_i_a , 0 )
689- DEFINE_ACCESSOR (ld_r_a , 0 )
690- DEFINE_ACCESSOR (reti , 0 )
691- DEFINE_ACCESSOR (retn , 0 )
692- DEFINE_ACCESSOR (hook , 0 )
693- DEFINE_ACCESSOR (illegal , 0 )
694- DEFINE_ACCESSOR (context , 0 )
695- DEFINE_ACCESSOR (cycles , 0 )
696- DEFINE_ACCESSOR (cycle_limit , 0 )
697- DEFINE_ACCESSOR (memptr , 0 )
698- DEFINE_ACCESSOR (pc , 0 )
699- DEFINE_ACCESSOR (sp , 0 )
700- DEFINE_ACCESSOR (xy , 0 )
701- DEFINE_ACCESSOR (ix , 0 )
702- DEFINE_ACCESSOR (iy , 0 )
703- DEFINE_ACCESSOR (af , 0 )
704- DEFINE_ACCESSOR (bc , 0 )
705- DEFINE_ACCESSOR (de , 0 )
706- DEFINE_ACCESSOR (hl , 0 )
707- DEFINE_ACCESSOR (af_ , 0 )
708- DEFINE_ACCESSOR (bc_ , 0 )
709- DEFINE_ACCESSOR (de_ , 0 )
710- DEFINE_ACCESSOR (hl_ , 0 )
711- DEFINE_ACCESSOR (memptrh , 0 )
712- DEFINE_ACCESSOR (memptrl , 0 )
713- DEFINE_ACCESSOR (pch , 0 )
714- DEFINE_ACCESSOR (pcl , 0 )
715- DEFINE_ACCESSOR (sph , 0 )
716- DEFINE_ACCESSOR (spl , 0 )
717- DEFINE_ACCESSOR (xyh , 0 )
718- DEFINE_ACCESSOR (yl , 0 )
719- DEFINE_ACCESSOR (ixh , 0 )
720- DEFINE_ACCESSOR (ixl , 0 )
721- DEFINE_ACCESSOR (iyh , 0 )
722- DEFINE_ACCESSOR (iyl , 0 )
723- DEFINE_ACCESSOR (a , 0 )
724- DEFINE_ACCESSOR (f , 0 )
725- DEFINE_ACCESSOR (b , 0 )
726- DEFINE_ACCESSOR (c , 0 )
727- DEFINE_ACCESSOR (d , 0 )
728- DEFINE_ACCESSOR (e , 0 )
729- DEFINE_ACCESSOR (h , 0 )
730- DEFINE_ACCESSOR (l , 0 )
731- DEFINE_ACCESSOR (a_ , 0 )
732- DEFINE_ACCESSOR (f_ , 0 )
733- DEFINE_ACCESSOR (b_ , 0 )
734- DEFINE_ACCESSOR (c_ , 0 )
735- DEFINE_ACCESSOR (d_ , 0 )
736- DEFINE_ACCESSOR (e_ , 0 )
737- DEFINE_ACCESSOR (h_ , 0 )
738- DEFINE_ACCESSOR (l_ , 0 )
739- DEFINE_ACCESSOR (r , 0 )
740- DEFINE_ACCESSOR (i , 0 )
741- DEFINE_ACCESSOR (r7 , 0 )
742- DEFINE_ACCESSOR (im , 0 )
743- DEFINE_ACCESSOR (request , 0 )
744- DEFINE_ACCESSOR (resume , 0 )
745- DEFINE_ACCESSOR (iff1 , 0 )
746- DEFINE_ACCESSOR (iff2 , 0 )
747- DEFINE_ACCESSOR (q , 0 )
748- DEFINE_ACCESSOR (options , 0 )
749- DEFINE_ACCESSOR (int_line , 0 )
750- DEFINE_ACCESSOR (halt_line , 0 )
751- DEFINE_ACCESSOR (sf , 0 )
752- DEFINE_ACCESSOR (zf , 0 )
753- DEFINE_ACCESSOR (yf , 0 )
754- DEFINE_ACCESSOR (hf , 0 )
755- DEFINE_ACCESSOR (xf , 0 )
756- DEFINE_ACCESSOR (pf , 0 )
757- DEFINE_ACCESSOR (nf , 0 )
758- DEFINE_ACCESSOR (cf , 0 )
677+ DEFINE_ACCESSOR (fetch_opcode )
678+ DEFINE_ACCESSOR (fetch )
679+ DEFINE_ACCESSOR (read )
680+ DEFINE_ACCESSOR (write )
681+ DEFINE_ACCESSOR (in )
682+ DEFINE_ACCESSOR (out )
683+ DEFINE_ACCESSOR (halt )
684+ DEFINE_ACCESSOR (nop )
685+ DEFINE_ACCESSOR (nmia )
686+ DEFINE_ACCESSOR (inta )
687+ DEFINE_ACCESSOR (int_fetch )
688+ DEFINE_ACCESSOR (ld_i_a )
689+ DEFINE_ACCESSOR (ld_r_a )
690+ DEFINE_ACCESSOR (reti )
691+ DEFINE_ACCESSOR (retn )
692+ DEFINE_ACCESSOR (hook )
693+ DEFINE_ACCESSOR (illegal )
694+ DEFINE_ACCESSOR (context )
695+ DEFINE_ACCESSOR (cycles )
696+ DEFINE_ACCESSOR (cycle_limit )
697+ DEFINE_ACCESSOR (memptr )
698+ DEFINE_ACCESSOR (pc )
699+ DEFINE_ACCESSOR (sp )
700+ DEFINE_ACCESSOR (xy )
701+ DEFINE_ACCESSOR (ix )
702+ DEFINE_ACCESSOR (iy )
703+ DEFINE_ACCESSOR (af )
704+ DEFINE_ACCESSOR (bc )
705+ DEFINE_ACCESSOR (de )
706+ DEFINE_ACCESSOR (hl )
707+ DEFINE_ACCESSOR (af_ )
708+ DEFINE_ACCESSOR (bc_ )
709+ DEFINE_ACCESSOR (de_ )
710+ DEFINE_ACCESSOR (hl_ )
711+ DEFINE_ACCESSOR (memptrh )
712+ DEFINE_ACCESSOR (memptrl )
713+ DEFINE_ACCESSOR (pch )
714+ DEFINE_ACCESSOR (pcl )
715+ DEFINE_ACCESSOR (sph )
716+ DEFINE_ACCESSOR (spl )
717+ DEFINE_ACCESSOR (xyh )
718+ DEFINE_ACCESSOR (xyl )
719+ DEFINE_ACCESSOR (ixh )
720+ DEFINE_ACCESSOR (ixl )
721+ DEFINE_ACCESSOR (iyh )
722+ DEFINE_ACCESSOR (iyl )
723+ DEFINE_ACCESSOR (a )
724+ DEFINE_ACCESSOR (f )
725+ DEFINE_ACCESSOR (b )
726+ DEFINE_ACCESSOR (c )
727+ DEFINE_ACCESSOR (d )
728+ DEFINE_ACCESSOR (e )
729+ DEFINE_ACCESSOR (h )
730+ DEFINE_ACCESSOR (l )
731+ DEFINE_ACCESSOR (a_ )
732+ DEFINE_ACCESSOR (f_ )
733+ DEFINE_ACCESSOR (b_ )
734+ DEFINE_ACCESSOR (c_ )
735+ DEFINE_ACCESSOR (d_ )
736+ DEFINE_ACCESSOR (e_ )
737+ DEFINE_ACCESSOR (h_ )
738+ DEFINE_ACCESSOR (l_ )
739+ DEFINE_ACCESSOR (r )
740+ DEFINE_ACCESSOR (i )
741+ DEFINE_ACCESSOR (r7 )
742+ DEFINE_ACCESSOR (im )
743+ DEFINE_ACCESSOR (request )
744+ DEFINE_ACCESSOR (resume )
745+ DEFINE_ACCESSOR (iff1 )
746+ DEFINE_ACCESSOR (iff2 )
747+ DEFINE_ACCESSOR (q )
748+ DEFINE_ACCESSOR (options )
749+ DEFINE_ACCESSOR (int_line )
750+ DEFINE_ACCESSOR (halt_line )
751+ DEFINE_ACCESSOR (sf )
752+ DEFINE_ACCESSOR (zf )
753+ DEFINE_ACCESSOR (yf )
754+ DEFINE_ACCESSOR (hf )
755+ DEFINE_ACCESSOR (xf )
756+ DEFINE_ACCESSOR (pf )
757+ DEFINE_ACCESSOR (nf )
758+ DEFINE_ACCESSOR (cf )
759759
760760# undef DEFINE_ACCESSOR
761761
@@ -778,10 +778,10 @@ void Init_z80(void)
778778 rb_define_alias (klass , "t=" , "cycles=" );
779779 rb_define_alias (klass , "wz" , "memptr" );
780780 rb_define_alias (klass , "wz=" , "memptr=" );
781- rb_define_alias (klass , "w " , "memptrh" );
782- rb_define_alias (klass , "w =" , "memptrh=" );
783- rb_define_alias (klass , "z " , "memptrl" );
784- rb_define_alias (klass , "z =" , "memptrl=" );
781+ rb_define_alias (klass , "wzh " , "memptrh" );
782+ rb_define_alias (klass , "wzh =" , "memptrh=" );
783+ rb_define_alias (klass , "wzl " , "memptrl" );
784+ rb_define_alias (klass , "wzl =" , "memptrl=" );
785785 rb_define_alias (klass , "vf" , "pf" );
786786 rb_define_alias (klass , "vf=" , "pf=" );
787787 rb_define_alias (klass , "state" , "to_h" );
0 commit comments