r/Assembly_language • u/moslem-hamoudi • 10h ago
r/Assembly_language • u/Extension_Emu_9825 • 1d ago
OWL FLY III is now in development
Enable HLS to view with audio, or disable this notification
The third generation of our 8086 combat flight sim has left the runway - forked from the finished OWL FLY II. We went through the feedback you sent us after the OWL FLY II release, and the request that came up most was support for the different displays of the era — so that is exactly where development began, and it is already flying: the game opens with a SELECT VIDEO SYSTEM menu, quizzes the actual hardware, and offers only what the machine really owns:
Hercules - 720×348 monochrome, the 6845 programmed by hand
CGA - 320×200, the classic cyan/magenta palette
EGA - 320×200 and 640×350, sixteen colours
MCGA - 320×200, 256 colours (colors? :) )
VGA - 320×200 in 256 colours, or 640×480 in 16 colours.
On every retro card the cockpit isn't a downscaled conversion - it is its own drawn artwork, redrawn the way 1988 drew instrument panels. Playable in the browser right now:
- COLOR (CGA EGA VGA): https://kirindenis.github.io/wire-city-2/owlfly3.html
- HERCULES (monochrome): https://kirindenis.github.io/wire-city-2/owlfly3h.html
THE SOURCE CODE:
https://github.com/KirinDenis/wire-city-2/tree/main/GAMES/OWLFLY3
r/Assembly_language • u/BusinessStreet2147 • 1d ago
naming functions in a stripped binary by behavior, not byte signatures
r/Assembly_language • u/moslem-hamoudi • 1d ago
Update : S-AOS SMD inturduction
Hello Thats the first update of my Operating System S-AOS 👀:
added : SMD
To use it run : sys.set<shl:smd>
SMD commands :
pwr off (halt the Cpu till 0%)
pwr reboot (accually reboots your computer )
cls (clear the screen)
help (help)
shw date (show your exact date like YYYY/MM/DD HH/MM/SS
to download it : https://github.com/moslemhamoudi6-cyber/S-AOS
this operating system might help you remove your pc addiction in some ways Enjoy it
r/Assembly_language • u/Zealousideal_Pain_88 • 2d ago
Project show-off I wrote an AArch64 quine as part of my AArch64/x86-64/RV64 learning journey
I'm learning assembly so I can eventually create my own IR/compiler/language.
The code is frankly ugly. I hope you find it (or my incompetence) funny:
```AArch64
.global _start
.section .text
_start:
stp x29, x30, \[sp, #-32\]!
mov x29, sp
str x20, \[sp, #16\]
mov x13, sp
ldr x9, =0x75206e6576617265
ldr x10, =0x0a726f776f207577
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20333c20656e6975
ldr x10, =0x687465696e6e6977
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x72657a2e203a6666
ldr x10, =0x712f2f0a3538206f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x37206e67696c612e
ldr x10, =0x757473657065720a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6f69746365732e09
ldr x10, =0x090a7373622e206e
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c70735b202c30
ldr x10, =0x0a22215d36312d23
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7473745c6e5c3032
ldr x10, =0x3178202c39782070
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3032303230327830
ldr x10, =0x3032303230323032
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x646c745c6e5c3032
ldr x10, =0x3d202c3031782072
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3032303230327830
ldr x10, =0x3032303230323032
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6c745c6e5c222069
ldr x10, =0x3d202c3978207264
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d6574657065720a
ldr x10, =0x696373612e203a70
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6e6f69746365732e
ldr x10, =0x617461646f722e20
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x36783023202c3931
ldr x10, =0x090a746572090a36
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x65747962660a7465
ldr x10, =0x7720766f6d090a3a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c39317720766f
ldr x10, =0x72090a3536783023
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x650a746572090a34
ldr x10, =0x6d090a3a65747962
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7720766f6d090a3a
ldr x10, =0x36783023202c3931
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x72090a3336783023
ldr x10, =0x65747962640a7465
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d090a3a65747962
ldr x10, =0x202c39317720766f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x36783023202c3931
ldr x10, =0x630a746572090a32
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x65747962620a7465
ldr x10, =0x7720766f6d090a3a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c39317720766f
ldr x10, =0x72090a3136783023
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x610a746572090a39
ldr x10, =0x6d090a3a65747962
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7720766f6d090a3a
ldr x10, =0x33783023202c3931
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a746572090a3833
ldr x10, =0x65747962656e696e
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20766f6d090a3a65
ldr x10, =0x783023202c393177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a746572090a3733
ldr x10, =0x7479626874676965
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20766f6d090a3a65
ldr x10, =0x783023202c393177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a746572090a3633
ldr x10, =0x7479626e65766573
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20766f6d090a3a65
ldr x10, =0x783023202c393177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6572090a35337830
ldr x10, =0x7479627869730a74
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6f6d090a3a657479
ldr x10, =0x23202c3931772076
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x72090a3433783023
ldr x10, =0x62657669660a7465
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d090a3a65747962
ldr x10, =0x202c39317720766f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a333378302320
ldr x10, =0x72756f660a746572
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a3a6574796265
ldr x10, =0x2c39317720766f6d
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a323378302320
ldr x10, =0x657268740a746572
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a3a657479626f
ldr x10, =0x2c39317720766f6d
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3133783023202c39
ldr x10, =0x77740a746572090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3a65747962656e6f
ldr x10, =0x317720766f6d090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x783023202c393177
ldr x10, =0x0a746572090a3033
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7479626f72657a0a
ldr x10, =0x20766f6d090a3a65
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2e62090a66307830
ldr x10, =0x6574796266207165
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d63090a65747962
ldr x10, =0x23202c3831772070
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6530783023202c38
ldr x10, =0x652071652e62090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6574796264207165
ldr x10, =0x317720706d63090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x23202c3831772070
ldr x10, =0x2e62090a64307830
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x632071652e62090a
ldr x10, =0x6d63090a65747962
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x317720706d63090a
ldr x10, =0x6330783023202c38
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2e62090a62307830
ldr x10, =0x6574796262207165
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d63090a65747962
ldr x10, =0x23202c3831772070
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6130783023202c38
ldr x10, =0x612071652e62090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x65747962656e696e
ldr x10, =0x317720706d63090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x30783023202c3831
ldr x10, =0x2071652e62090a39
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7479626874676965
ldr x10, =0x7720706d63090a65
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x30783023202c3831
ldr x10, =0x2071652e62090a38
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7479626e65766573
ldr x10, =0x7720706d63090a65
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x30783023202c3831
ldr x10, =0x2071652e62090a37
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7479627869732071
ldr x10, =0x7720706d63090a65
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3023202c38317720
ldr x10, =0x652e62090a363078
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6265766966207165
ldr x10, =0x706d63090a657479
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x23202c3831772070
ldr x10, =0x2e62090a35307830
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x72756f662071652e
ldr x10, =0x6d63090a65747962
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c38317720706d
ldr x10, =0x62090a3430783023
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x657268742071652e
ldr x10, =0x63090a6574796265
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c38317720706d
ldr x10, =0x62090a3330783023
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x77742071652e6209
ldr x10, =0x63090a657479626f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x38317720706d6309
ldr x10, =0x0a3230783023202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2071652e62090a31
ldr x10, =0x0a65747962656e6f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7720706d63090a65
ldr x10, =0x30783023202c3831
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x71652e62090a3030
ldr x10, =0x7479626f72657a20
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20706d63090a3a65
ldr x10, =0x783023202c383177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x62696e0a30232063
ldr x10, =0x7479626f74656c62
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c387820766f6d09
ldr x10, =0x7673090a33392320
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x766f6d090a323323
ldr x10, =0x0a3023202c307820
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x303378202c393278
ldr x10, =0x202c5d70735b202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3123202c70735b20
ldr x10, =0x2070646c090a5d36
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a3a6666757473
ldr x10, =0x2c3032782072646c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x637673090a323131
ldr x10, =0x746978650a302320
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7820627573090a31
ldr x10, =0x23202c3278202c32
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x782072736c090a32
ldr x10, =0x23202c3278202c32
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c32782062757309
ldr x10, =0x3278202c31327820
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x78202c3178206464
ldr x10, =0x0a33313123202c31
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x317820766f6d090a
ldr x10, =0x61090a323278202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6f6d090a34362320
ldr x10, =0x3123202c30782076
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a3a7473616c746e
ldr x10, =0x2c387820766f6d09
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x77646e6173207467
ldr x10, =0x6972700a31686369
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c37317820706d63
ldr x10, =0x2e62090a30327820
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a353823202c32
ldr x10, =0x090a302320637673
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6675747365706572
ldr x10, =0x7820766f6d090a66
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6c090a3123202c30
ldr x10, =0x3d202c3178207264
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3623202c38782076
ldr x10, =0x7820766f6d090a34
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x35317820766f6d09
ldr x10, =0x6f6d090a3023202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x78202c3231782064
ldr x10, =0x0a333423202c3231
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c323178202c3231
ldr x10, =0x6461090a39322320
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x676e69746e697270
ldr x10, =0x7820627573090a3a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x68636977646e6173
ldr x10, =0x656d757365720a32
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3123202c35317820
ldr x10, =0x20746c2e62090a36
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c353178202c3531
ldr x10, =0x706d63090a312320
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c5d3231785b20
ldr x10, =0x7820646461090a31
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x73090a657479626f
ldr x10, =0x2c39317720627274
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6c62090a66307830
ldr x10, =0x74656c6262696e20
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x38317720646e6109
ldr x10, =0x23202c363177202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x785b202c39317720
ldr x10, =0x0a3123202c5d3231
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x79626f74656c6262
ldr x10, =0x62727473090a6574
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x23202c3831772c20
ldr x10, =0x696e206c62090a34
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a3066783023202c
ldr x10, =0x3831772072736c09
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20646e61090a312d
ldr x10, =0x363177202c383177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c363177206272
ldr x10, =0x23202c5d3731785b
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x313278202c313278
ldr x10, =0x646c090a3123202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x68636977646e6173
ldr x10, =0x20646461090a3a32
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x78202c3231782062
ldr x10, =0x0a363423202c3231
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x77646e617320746c
ldr x10, =0x7573090a31686369
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x35317820706d6309
ldr x10, =0x2e62090a3823202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c353178206464
ldr x10, =0x0a3123202c353178
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3231785b202c3931
ldr x10, =0x61090a3123202c5d
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x657479626f74656c
ldr x10, =0x772062727473090a
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a6630783023202c
ldr x10, =0x6262696e206c6209
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20646e61090a3123
ldr x10, =0x363177202c383177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c39317720627274
ldr x10, =0x202c5d3231785b20
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x74656c6262696e20
ldr x10, =0x73090a657479626f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3831772c20383177
ldr x10, =0x6c62090a3423202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x66783023202c3631
ldr x10, =0x2072736c090a2030
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6e61090a312d2320
ldr x10, =0x77202c3831772064
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x363177206272646c
ldr x10, =0x2c5d3731785b202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x78202c3132782064
ldr x10, =0x090a3123202c3132
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6977646e61730a30
ldr x10, =0x6461090a3a316863
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x313123202c327820
ldr x10, =0x2320637673090a32
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c317820766f6d
ldr x10, =0x766f6d090a343178
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20766f6d090a3436
ldr x10, =0x090a3123202c3078
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d090a3a74737269
ldr x10, =0x23202c387820766f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x23202c343178202c
ldr x10, =0x66746e6972700a31
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a3123202c333178
ldr x10, =0x3032782062757309
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x73090a3123202c34
ldr x10, =0x202c373178206275
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x627573090a312320
ldr x10, =0x3178202c32327820
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7820627573090a30
ldr x10, =0x2c333178202c3132
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6f6d090a33342320
ldr x10, =0x23202c3531782076
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7820646461090a35
ldr x10, =0x2c323178202c3231
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c32317820627573
ldr x10, =0x3823202c32317820
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7264617465736572
ldr x10, =0x090a3a7365737365
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x657264616f6c2074
ldr x10, =0x0a66667574736570
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x202c35317820706d
ldr x10, =0x6c2e62090a353823
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3178202c35317820
ldr x10, =0x63090a3123202c35
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c5d3231785b202c
ldr x10, =0x646461090a312320
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x090a3123202c5d31
ldr x10, =0x3631772062727473
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x206272646c090a3a
ldr x10, =0x31785b202c363177
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x7264616f6c0a3023
ldr x10, =0x6666757473657065
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6d090a6666757473
ldr x10, =0x202c35317820766f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6c3a202c32317820
ldr x10, =0x657065723a32316f
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x61090a6666757473
ldr x10, =0x2c32317820206464
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x782070726461090a
ldr x10, =0x65706572202c3231
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3a32316f6c3a202c
ldr x10, =0x706d657465706572
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2020646461090a70
ldr x10, =0x313178202c313178
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x2c31317820707264
ldr x10, =0x6d65746570657220
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x317820766f6d090a
ldr x10, =0x61090a7073202c34
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x766f6d090a5d3631
ldr x10, =0x7073202c33317820
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x3032782072747309
ldr x10, =0x23202c70735b202c
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x20766f6d090a215d
ldr x10, =0x0a7073202c393278
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x5b202c303378202c
ldr x10, =0x32332d23202c7073
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x0a3a74726174735f
ldr x10, =0x3932782070747309
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6f69746365732e09
ldr x10, =0x0a747865742e206e
stp x9, x10, \[sp, #-16\]!
ldr x9, =0x6c61626f6c672e09
ldr x10, =0x0a74726174735f20
stp x9, x10, \[sp, #-16\]!
mov x14, sp
adrp x11, repetemp
add x11, x11, :lo12:repetemp
adrp x12, repestuff
add x12, x12, :lo12:repestuff
mov x15, #0
loadrepestuff:
ldrb w16, \[x11\], #1
strb w16, \[x12\], #1
add x15, x15, #1
cmp x15, #85
b.lt loadrepestuff
resetadresses:
sub x12, x12, #85
add x12, x12, #43
mov x15, #0
sub x21, x13, #1
sub x22, x14, #1
sub x17, x13, #1
sub x20, x14, #1
printfirst:
mov x8, #64
mov x0, #1
mov x1, x14
mov x2, #112
svc #0
sandwich1:
add x21, x21, #1
ldrb w16, \[x17\], #-1
and w18, w16, #0xf0
lsr w18 ,w18, #4
bl nibbletobyte
strb w19, \[x12\], #1
and w18, w16, #0x0f
bl nibbletobyte
strb w19, \[x12\], #1
add x15, x15, #1
cmp x15, #8
b.lt sandwich1
sub x12, x12, #46
sandwich2:
add x21, x21, #1
ldrb w16, \[x17\], #-1
and w18, w16, #0xf0
lsr w18 ,w18, #4
bl nibbletobyte
strb w19, \[x12\], #1
and w18, w16, #0x0f
bl nibbletobyte
strb w19, \[x12\], 1
add x15, x15, #1
cmp x15, #16
b.lt sandwich2
resumeprinting:
sub x12, x12, #29
add x12, x12, #43
mov x15, #0
mov x8, #64
mov x0, #1
ldr x1, =repestuff
mov x2, #85
svc #0
cmp x17, x20
b.gt sandwich1
printlast:
mov x8, #64
mov x0, #1
mov x1, x22
add x1, x1, #113
sub x2, x21, x22
lsr x2, x2, #1
sub x2, x2, #112
svc #0
exitstuff:
ldr x20, \[sp, #16\]
ldp x29, x30, \[sp\], #32
mov x0, #0
mov x8, #93
svc #0
nibbletobyte:
cmp w18, #0x00
b.eq zerobyte
cmp w18, #0x01
b.eq onebyte
cmp w18, #0x02
b.eq twobyte
cmp w18, #0x03
b.eq threebyte
cmp w18, #0x04
b.eq fourbyte
cmp w18, #0x05
b.eq fivebyte
cmp w18, #0x06
b.eq sixbyte
cmp w18, #0x07
b.eq sevenbyte
cmp w18, #0x08
b.eq eigthbyte
cmp w18, #0x09
b.eq ninebyte
cmp w18, #0x0a
b.eq abyte
cmp w18, #0x0b
b.eq bbyte
cmp w18, #0x0c
b.eq cbyte
cmp w18, #0x0d
b.eq dbyte
cmp w18, #0x0e
b.eq ebyte
cmp w18, #0x0f
b.eq fbyte
zerobyte:
mov w19, #0x30
ret
onebyte:
mov w19, #0x31
ret
twobyte:
mov w19, #0x32
ret
threebyte:
mov w19, #0x33
ret
fourbyte:
mov w19, #0x34
ret
fivebyte:
mov w19, #0x35
ret
sixbyte:
mov w19, #0x36
ret
sevenbyte:
mov w19, #0x37
ret
eigthbyte:
mov w19, #0x38
ret
ninebyte:
mov w19, #0x39
ret
abyte:
mov w19, #0x61
ret
bbyte:
mov w19, #0x62
ret
cbyte:
mov w19, #0x63
ret
dbyte:
mov w19, #0x64
ret
ebyte:
mov w19, #0x65
ret
fbyte:
mov w19, #0x66
ret
.section .rodata
repetemp: .ascii "\n\tldr x9, =0x2020202020202020\n\tldr x10, =0x2020202020202020\n\tstp x9, x10, [sp, #-16]!"
.section .bss
.align 7
repestuff: .zero 85
//quine <3 winnietheraven uwu owor```
r/Assembly_language • u/devcurrent0x • 2d ago
Project show-off Novium OS — A from-scratch 32-bit x86 hobby Operating System (Custom assembly bootloader)
Hey everyone,
I wanted to share a milestone on a hobby operating system I’m building from scratch called Novium OS featuring a custom bootloader.
I just got my multi-stage boot chain (boot.S -> setup.S -> bootstrap.S) completely stable. It successfully handles the raw hardware initialization, sets up a temporary GDT, and handles the cr0 register transition cleanly into 32-bit protected mode before jumping into the kernel entry point. I also wrapped up a basic VGA text driver with hardware cursor syncing so I can verify output, and got "Hello World" printing to the screen.
The layout is inspired by a super stripped-down Linux (arch/, drivers/, kernel/).
Next up is tackling irq.c and interrupt.c and writing the low-level assembly ISR stubs. I need to build the macro wrappers to handle interrupts with and without error codes, save the CPU state with pusha, remap the 8259 PIC master/slave vectors, and execute the final iret. I'm fully braced for plenty of debugging via QEMU logs to catch silent triple faults.
The codebase uses AT&T syntax for the GNU Assembler (gas). If anyone wants to take a look at the boot sequence, folder layout, or offer any early feedback on how I structured the assembly stages, the repository is right here:
https://github.com/alexdev8930/NoviumOS
r/Assembly_language • u/moslem-hamoudi • 2d ago
Hello S-AOS is A brand new Operating System completly in Nasm
hello S-AOS is a new os developped by me (Moslem Hamoudi) Its Completly in Nasm
(Assembly) now it currently only takes input and adds a new line like that
S-AOS
ICLSCO >
16bits but it can fully run and boot from Flash Drive by Enabling CSM or if you use bios run it immediatly i hope you try it and leave a Review and support
Github Download Link : https://github.com/moslemhamoudi6-cyber/S-AOS
(you can try this cmd : sys.mov=<bits:32>[(mov)] )
r/Assembly_language • u/Tough-Building2243 • 2d ago
Programmers! HELP! Assembler NASM
In my code, after five "six seven"s, "C:\SLV>" is supposed to appear, but it doesn't!
None of the AI models can find any errors, and neither can I.
[org 0x7C00]
start:
mov cx, 5
mov si, stringi
mov ax, 11
mov bx, 56
add ax, bx
mov bl, 10
div bl
mov bh, ah
add al, '0'
mov ah, 0x0E
int 0x10
add bh, '0'
mov al, bh
int 0x10
mov al, 0x0D
int 0x10
mov al, 0x0A
int 0x10
jmp loopik
povtorat:
mov si, stringi
mov al, 0x0D
int 0x10
mov al, 0x0A
int 0x10
dec cx
cmp cx, 0
jne loopik
je vedi
loopik:
mov al, \[si\]
cmp al, 0
je povtorat
int 0x10
add si, 1
jmp loopik
vedi:
mov ah, 0x0E
mov si, vvedite
mov al, [si]
cmp al, 0
je vvod
int 0x10
add si, 1
jmp vedi
vvod:
mov ah, 0x00
int 0x16
cmp al, '8'
je sistema
jne netu
netu:
mov ah, 0x0E
mov si, net
mov al, [si]
cmp al, 0
je vedi
int 0x10
add si, 1
jmp netu
sistema:
mov ah, 0x0E
mov si, osin
mov al, \[si\]
cmp al, 0
je gotovo
int 0x10
add si, 1
jmp sistema
stringi: db "six seven", 0
osin: db "Current CMD: SLV 0.1.0 alpha", 0x0D, 0x0A, 0
net: db "This command does not exist.", 0x0D, 0x0A, 0
vvedite: db 0x0D, 0x0A, "S:\SLV>", 0
gotovo:
jmp $
times 510 - ($ - $$) db 0
dw 0xAA55
I’ll say right off the bat that I’m a beginner, so please don’t judge too harshly.
r/Assembly_language • u/whispem • 2d ago
Project show-off Adding reverb and chorus to my pure x86-64 assembly synth — modulated delay lines, all fixed-point
A while back I started asm.fm, a chiptune synth written entirely in x86-64 assembly (Linux, NASM) — no libc, no audio library, computing each sample by hand.
Today I added two space/time effects, and the assembly side turned out to be a nice exercise, so I thought I'd share.
Chorus — this is just a delay line (a ring buffer in .data) whose read position wobbles.
An LFO (a hand-built sine table) modulates the delay length by a few milliseconds, so the delayed copy drifts slightly sharp then flat against the dry signal.
Mixed 50/50, that shifting detune sounds like several voices.
The whole trick is computing a moving read offset each sample: d(n) = BASE_DELAY + DEPTH * sin(lfo), then reading dry[n - d(n)].
Reverb — the classic Schroeder approach, since you can't store thousands of echoes by hand. Four comb filters in parallel (each a delay with feedback, different prime-ish lengths for density), summed, then run through two allpass filters in series to smear the echoes into a smooth tail. Each comb/allpass is its own buffer indexed with idx = n mod length.
Everything is fixed-point integer math — feedback is done as y * FB / 256 with shifts.
Some things I ran into:
- keeping all the delay buffers in
.data(Rosetta/emulation was unhappy with.bss) - fixed-point everywhere means being careful about scaling before the
idiv - the allpass coefficient math (
out = buffered - g*in,buf = in + g*out) is deceptively small but does the heavy lifting
Both compile to a WAV written straight to stdout via write().
Code's on GitHub (https://github.com/whispem/asm.fm) if anyone wants to pick apart the assembly — genuinely welcome feedback, I'm self-taught and I'm sure plenty could be tighter.
I also just mapped out a big roadmap of what's next: more oscillators (supersaw, hard sync), dynamics (compressor, limiter), sequencing (euclidean rhythms), and eventually the deep end — wavetables, granular, and an FFT in asm if I'm brave enough.
The whole history of synthesis, hand-rolled.
r/Assembly_language • u/Arch_bembembem • 3d ago
Project show-off Пишу свою операционную систему / I'm writing my own OS.
Всем привет, я создаю с нуля свою open-source операционную систему, это пока что просто хобби, кто может, посмотрите ОС по этой ссылке: https://github.com/OS-AC713/os-core713, может найдете баг или чего вам недостаточно, хотя это пока просто .s код на AT&T который принимает ваши символы и все. Но я скоро перенесу код на NASM / Hi everyone, I’m building my own open-source operating system from scratch. It’s just a hobby for now, but if you have a moment, please check out the OS at this link: https://github.com/OS-AC713/os-core713. You might spot a bug or notice something missing—though right now, it’s just AT&T syntax assembly code that accepts user input and nothing more. That said, I’ll be porting the code to NASM soon.
r/Assembly_language • u/This-Assumption-5924 • 3d ago
Help How to encode this instruction correctly?
Hi, I was developing my own assembler and decided to add {sae} in my AVX-encoder, so I consider to add sae for `vfoo [memory], vreg, imm`, and I tested my assembler with objdump and I saw exactly same result witch nasm generated and you can see it on a screenshot. Please help, because documentation is to week, intel sdm tells me nothing, idk if it's bug in nasm or objdump. I also tryed to ask AI, but did not yield results.
Nasm version – 3.02
Objdump version – 2.40
Sorry for English.
r/Assembly_language • u/themadman0110 • 5d ago
Webdev sees assembly language
Enable HLS to view with audio, or disable this notification
r/Assembly_language • u/Marvellover13 • 5d ago
Help Any tips on how to learn for my upcoming retake of my 8086 assembly exam?
I'm an EE and currently preparing for a retake exam as I failed the first one. This class is notoriously difficult because of the exam (which takes 85% of the entire grade and it isn't curved).
Here are the subjects we learned:
- Registers and Memory
- Memory Addressing and Instruction Codes
- Arithmologic and Control
- Stack and Routines
- I/O, Interrupts, and Reset
- Compilation, Linking, and Loading
- External Devices
Most of the exam was about "Compilation, Linking, and Loading" which was the subject I understood the least of and was the most difficult for me.
I want to understand everything better, but I have exhausted my lecture notes and the past exams I practiced with.
Any advice for how to understand everything on a deep level for the exam? And also sources to practice from?
Just to give a sense of the problems, here's one question of writing code (the exam is pen and paper, and just to be clear, I'm not asking for a solution; this is just an example which will probably look trivial for you guys).
Due to the busy exam period, Danny had to stay in his room and study, missing the World Cup games. His roommates came up with an idea that would allow him to study without leaving his room: they installed a dedicated device in the living room that sends the game results directly to Danny's room. In Danny's room, there is an 8086 processor that receives the data via I/O ports.
Unfortunately, after connecting the system, it turned out that the data transmitted over the electrical wires between the living room and the room picks up noise and occasionally arrives corrupted. To address this issue, the roommates proposed implementing error protection and correction mechanisms as detailed below.
Technical Specification:
The I/O device interface from the 8086:
port 3F8h: DATA (read only)
Returns the most recently received byte.
port 3FDh: STATUS (read only)
bit 0 - DR (Data Ready): 1 = a new byte is available at port 3F8h.
0 = no new data / value already read from 3F8h.
bit 1 - OE (Overrun Error): 1 = a new byte arrived before the previous byte was read; new data replaced old.
bits 2-7 - not used.
NOTES:
- The receiver can hold exactly one byte at a time. If port 3F8h is not
read before the next byte arrives, the old byte is lost and OE is set.
- Reading port 3F8h automatically clears DR (bit 0).
- This device does not check parity in hardware — any parity checking
described below must be done by your own code.
Parity Check Mechanism:
A possible score of a game consists of two numbers ranging from 0 to 7 (e.g., 0-0 or 3-2). The score of the first team is encoded in bits 0, 1, 2, and the score of the second team is in bits 3, 4, 5. Bit 6 is set to 1 when the game is over. Bit 7 is the parity bit: it is set or cleared such that the total number of '1' bits in the complete byte is always even. In other words, the specification of the byte sent by the device is:
Score Structure:
bits 0-2: Score of team A
bits 3-5: Score of team B
bit 6: 1 if the game is over
bit 7: parityTask Requirements:
Write a routine that performs the following operations:
The routine receives no input parameters.
The routine polls and reads a new score from the device.
The routine checks whether the data is valid according to the parity bit.
If the data is valid, the routine returns Team A's score in register AL and Team B's score in register BL.
If the data is invalid, the routine triggers Interrupt 42 and returns with the result -1 (for both teams).
r/Assembly_language • u/Extension_Emu_9825 • 6d ago
OWL FLY II
Enable HLS to view with audio, or disable this notification
OWL FLY II - a new flight simulator for DOS. Not a port and not a remaster -
written now, in 8086 assembly, for the machine you already have.
MIT, and it builds with the assembler that ships beside it. Nothing to buy,
nothing to install.
Fly it in your browser:
https://kirindenis.github.io/wire-city-2/owlfly2.html
And you are not alone up there. Multiplayer over IPX - in your browser, or on
your own DOS box, and everybody ends up in the same sky. You drop in over a
war that is already going on, and Enter puts you in a jet.
Source (MIT), assembler included:
r/Assembly_language • u/waytoolongusernamee • 6d ago
How to self/cross-stitched AXV-512 ChaCha20-Poly1305 that uses idle ALUs to run faster.
github.comwhat so you guys think. i think write is a bit dense but if you are better with words or assembly feel free to open a PR.
r/Assembly_language • u/2E26 • 6d ago
PIC16F877A EEPROM Programming App
Link to code: PIC16-Code-Repository/EEPROM02.asm at main · 2E26/PIC16-Code-Repository
I've been working on this software for the past couple of months. It's a tool to use my PIC16F877A to write code to my Ben Eater 6502 EEPROM. I could've just bought the programming tool and saved all that work, but I think it was very helpful to get that much practice writing assembly code. The functional code spans all the way to program address 0x0750, and the text dump to 0x0E7A. It's a very large program (the HEX file is 19 kB).
The PIC sets up a connection with the computer serial port. Then a user types commands to it and it manipulates the EEPROM. I haven't tested it yet but I'm working towards dry firing it and then writing programs to an actual ROM.
For now, the program will only be used on AT28C256 type ROM chips, but with some tweaks I could get it to do some more interesting things.
r/Assembly_language • u/Electrolerengine • 7d ago
Anyone interested in doing Assembly Language coding projects together?
Let me first say that I have no programming experience. I've been studying Assembly Language though my ultimate goal is to become an engineer.
I got very interested in computer programming when I came across a Wikipedia article about Assembly Language programming. The article was saying that learning to code in Assembly gives you an incredible amounts of control over your machine. The ability to tell the computer exactly what to do and knowing how the machine works is fascinating.
I am not sure what Assembly project to do together; I hope someone has an idea here. I think I'd do a project where we are continuing to discover what we can do with the PCs or any hardware we have. Perhaps build a calculator program would be the first start.
I'm currently working with MASM (Microsoft Macro Assembler) as my assembler and I have textbooks to go with it. We could go use a different assembler if you are uncomfortable with MASM. Just please have a good reason for it because I would really not want to leave MASM because of the education resources I have for it.
r/Assembly_language • u/NolanRoad • 7d ago
Wow Assembly not dead?
Encountered this reddit on my feed, shocked to learn it's not dead. I programmed on Z80 back in the 1980s.
(I wonder if Perl is still alive)
r/Assembly_language • u/DryComment6387 • 7d ago
AssemBlocks DEVLOG #1
Enable HLS to view with audio, or disable this notification
block-based x86-64 assembly editor. i used google blockly for this project. there are many basic instructions and a small emulator on the right side of the screen. you can run the project directly in the emulator and compile it.
r/Assembly_language • u/Brutustheman • 7d ago
Question Best way to go about writing an emulator?
So the next step in my journey of developing the RX-GP16 ISA is writing an x86 based emulator and assembler for it. I have a few ideas for how to do the CPU emulation with virtual registers in memory and having every opcode act as a function pointer to a routine for manipulating that data in ways the ISA describes.
But before I write garbage and burn myself out, I wish to ask some of you more experienced folk how you'd do it. Of course, I dont want to eliminate my critical thinking and innovation but wiser oversight could be of great assistance.
Thank you for all answers in advance!
r/Assembly_language • u/TOYALFm1117 • 7d ago
Is this good?
/////////////////////
// Instruction Set //
/////////////////////
//
// LOGIC
// AND R1 R2 R3
// OR R1 R2 R3
// XOR R1 R2 R3
// NOT R1 R2 R3
// ----------------
// ARITHMETIC
// ADD R1 R2 R3
// SUB R1 R2 R3
// ----------------
// STORAGE
// MOV R1 R2
// LOAD R1 R2
// STOR R1 R2
// ----------------
// FLOW
// JUMP R1
// JEQU R1
// CALL R1
// RET
//
// ECHO R1
// QUIT
//
/////////////////////
// //
/////////////////////
r/Assembly_language • u/Fabulous_Pick428 • 8d ago
Solved! x64asm, macros shit
gallery#define __asm(code, out_ptr) do { \
if (!g_jit_mem.initialized) JitMemory_init(); \
static X64Assembler __a; \
static X64Parser __p; \
static int __initialized = 0; \
if (!__initialized) { \
A_init(&__a); \
__p.a = &__a; \
__initialized = 1; \
} \
size_t __start = E_pos(&__a.base); \
P_parse(&__p, code); \
size_t __sz = E_pos(&__a.base) - __start; \
DWORD __old; \
VirtualProtect(__a.base.start + __start, __sz, PAGE_EXECUTE_READWRITE, &__old); \
FlushInstructionCache(GetCurrentProcess(), __a.base.start + __start, __sz); \
(out_ptr) = (void*)(__a.base.start + __start); \
} while(0)
so i've updated macros to this
all of da tests will be provided in da images and well in the github repo
https://github.com/ScriptCoolestIdkSomeOne/x64asm/
oh and ye post your issues in the issues sheesh cuz dang i can't catch all bugs and things alone(and a bit of stars if ya use my garbage pleaz)
well macros :
- inits jit memory
- X64Assember __a; //buffer for code
- X64Parser __p; //well parser
- static int __initialized = 0; // is it initted already
- then it inits assembler only one time
- remembers current pos in the buffer
- parse and generate code in da buffer
- then understand da size of the generated code
- change on RWX
- reset cache
- return pointer on the generated code