line to Rust?
                  
                  
                  void  geninterrupt (int x) {
                  
                  
                    __asm__("  movb %[x], %%al \n"
                  
                  
                            "  movb %%al, genint+1 \n"
                  
                  
                            "  jmp genint \n"
                  
                  
                            "genint: \n"
                  
                  
                            "  int $0 \n"
                  
                  
                           : /* no outputs */
                  
                  
                           : [x] "m" (x) /* use x as input */
                  
                  
                           : "al" /* clobbers %al */
                  
                  
                           );
                  
                  
                  }
                  
                  
                
do you want the asm! macro? https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html
Обсуждают сегодня