29 lines
461 B
Python
29 lines
461 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
print('''
|
|
.intel_syntax noprefix
|
|
.extern isr_common
|
|
''')
|
|
|
|
print('// Interrupt Service Routines')
|
|
for i in range(255):
|
|
print('''isr{0}:
|
|
cli
|
|
{1}
|
|
push {0}
|
|
jmp isr_common
|
|
'''.format(i,
|
|
'push 0' if i not in [8, 10, 11, 12, 13, 14, 17] else 'nop'))
|
|
|
|
print('''
|
|
|
|
// Vector table
|
|
|
|
.section .data
|
|
.global isr_table
|
|
isr_table:
|
|
''')
|
|
for i in range(255):
|
|
print(' .quad isr{}'.format(i))
|